Add one to a junction of Ints:
put any( 1, 3, 7 ) + 1;
Now you have a junction of those Ints increased by one:
any(2, 4, 8)
So, 2 == any(2, 4, 8)
is true.
Make a junction of strings and append to those strings:
put any( <h H> ) ~ 'amadryas';
You get a different result that doesn't equal 'hamadryas' or 'Hamadryas':
any("h", "H")amadryas
I expected something like:
any( 'hamadryas', 'Hamadryas' );
What's the difference in these operations that gives them different behavior even though they should be similar?
on the High Sierra 10.13, put fails with:
put any( 1, 3, 7 ) + 1
This type cannot unbox to a native string: P6opaque, Junction in block at line 1
perl6 -v
This is Rakudo Star version 2017.10 built on MoarVM version 2017.10 implementing Perl 6.c.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With