Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • my @pascal := do [1], -> @p { [0, @p Z+ @p, 0] } ... *;
    ...

    (The extra do required because of a shortcoming in Rakudo.)

    FWIW, I think parentheses will work here also.

    my @pascal := ([1], -> @p { [0, @p Z+ @p, 0] } ... *);

    Pm

    • Aye. I considered both forms, and went with the do form.

      When binding has list precedence, neither parentheses nor the do will be needed.