On Thu, Jun 25, 2009 at 1:20 PM, Moritz Lenzmor...@faui2k3.org wrote:
Hi,
I had the pleasure to implement the series operator (infix:...) in
Rakudo(*), and came across the difficulty to come up with a signature
for it. These are the use cases I want to cover:
1, 2 ... { $^a + $^b }
1 ... {
S02 says-
Anywhere you can use a single type you can use a set of types, for
convenience specifiable as if it were an or junction:
my Int|Str $error = $val; # can assign if $val~~Int
or $val~~Str
so would
sub infix:...(Array|Scalar $values, Code $generator)
be kosher?
I'm with
Hi,
I had the pleasure to implement the series operator (infix:...) in
Rakudo(*), and came across the difficulty to come up with a signature
for it. These are the use cases I want to cover:
1, 2 ... { $^a + $^b }
1 ... { $_ + 1 }
The first one can clearly be written as
sub infix:...(@values,