I expected this to DWIM today:
$ perl6 -e 'my $cl = { "$^name upcased becomes {$^name.uc}" }; say $cl("larry")'
...but it doesn't in Rakudo r32938:
too few arguments passed (0) - 1 params expected
...and for understandable (if not good) reasons: the closure inside
the string expects a parameter
HaloO,
Moritz Lenz via RT wrote:
On Wed Nov 19 07:35:48 2008, masak wrote:
what should the behaviour of sign($x) be when $x is complex?
I'd argue that it's a Failure.
This is a bit drastic. If one computes in the complex domain
a complex valued sign function is appropriate.
multi sub s
On Wed Nov 19 07:35:48 2008, masak wrote:
> what should the behaviour of sign($x) be when $x is complex?
I'd argue that it's a Failure.
If you care about complex numbers, you usually want an angle instead,
which you can get with Complex.polar. (And it's easier to give it a
another meaning later t