• Re: failing to understand/use lambda

    From Ralf Fassel@21:1/5 to All on Wed Jun 25 11:02:09 2025
    * Mark Summerfield <[email protected]>
    | oo::define Store method add {args} {
    | puts "action: adding [llength $args] new files"
    | $Reporter "adding [llength $args] new files"
    | }
    --<snip-snip>--
    | Actual output:

    | action: adding 3 new files
    | invalid command name "::apply {message { puts "reporter: $message" }}"

    Note that I have no experience with lambda(n), but the error message
    sounds like you need

    {*}$Reporter "adding ..."

    when calling the reporter (i.e. expand the command being called).

    HTH
    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Wed Jun 25 11:47:22 2025
    * Mark Summerfield <[email protected]>
    | PS I use the Pan newsreader and ever with wrap off it still messes up
    | my posts when it comes to code (e.g., seemingly randomly ignoring
    | newlines).

    Your original post looked fine on my side (no
    additional/superfluous/missing newlines) ...

    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)