3 ms·
if you want a more general way to create anonymous functions in Perl 6, it's not that many more keystrokes away: sub ($a, $b) { $a + $b, [1, 2, 3], [4, 5,
by perlgeek 9y ago
if you want a more general way to create anonymous functions in Perl 6, it's not that many more keystrokes away:
sub ($a, $b) { $a + $b, [1, 2, 3], [4, 5, 6] }
Or even
sub { $^a + $^b, [1, 2, 3], [4, 5, 6] }
So yes, the whatever-star isn't the most powerful thing imaginable, but it's good enough for very simple cases, and more powerful mechanism are available too.
- bloaf 9y agoBut that's my point. Mathematica's # syntax is both. (i.e. it is good enough for very simple cases, and it is the more powerful mechanism.)