On 2019-12-15 12:30, Simon Proctor wrote:
https://docs.raku.org/language/optut

This should cover it.

On Sun, 15 Dec 2019, 20:17 ToddAndMargo via perl6-users, <perl6-us...@perl.org <mailto:perl6-us...@perl.org>> wrote:

    On 2019-12-15 02:56, Tobias Boege wrote:
     > On Sat, 14 Dec 2019, ToddAndMargo wrote:
     >> What am I doing wrong here?
     >>
     >>> multi prefix:<√> (Cool:D $x) { $x.sqrt }
     >> &prefix:<√>
     >>
     >>> say √2
     >> ===SORRY!===
     >> Argument to "say" seems to be malformed
     >> ------> say⏏ √2
     >> Bogus postfix
     >
     > If this is inside the REPL, it's not your fault. It's a known issue:
     > https://github.com/rakudo/rakudo/issues/2245
     >
     > Regards,
     > Tobias
     >

    Hi Tobias,

    Well now, its really not me?  That is an odd feeling.

    For my keeper on the subject, I searched the documentation
    for "prefix:" and found a gazillion entries.  A lot of
    how use it other things with it, but nothing specifically
    for "prefix:".   Do you know if one exists?

    Many thanks,
    -T


Hi Simon,

I now have my reference entered on my keeper.
Thank you!

Reference(s):
    https://docs.raku.org/language/optut

       # Alternatively we could create a more
       # general operator to sum n numbers
       sub prefix:<Σ>( *@number-list ) {
           [+] @number-list
       }

       say Σ (13, 16, 1); # OUTPUT: «30␤»


I have to say that Tobias is a lot better at explaining it.
So I included his stuff too.

-T



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to