| 46 | | sub respect(*@a) { |
| 47 | | my @b = (); |
| 48 | | push @b for @a; |
| 49 | | return @b.elems; |
| | 46 | #?rakudo skip 'slurpies not working' |
| | 47 | { |
| | 48 | sub respect(*@a) { |
| | 49 | my @b = (); |
| | 50 | push @b for @a; |
| | 51 | return @b.elems; |
| | 52 | } |
| | 53 | |
| | 54 | is respect(1,2,3), 3, 'a for loop inside a sub loops over each of the elements'; |
| | 55 | is respect([1,2,3]), 3, '...even if they are sent as an array ref'; # is this right? |
| | 56 | is respect( my @a = 1, 2, 3 ), 3, '...and when the array is declared in the argument list'; |
| 51 | | |
| 52 | | is respect(1,2,3), 3, 'a for loop inside a sub loops over each of the elements'; |
| 53 | | is respect([1,2,3]), 3, '...even if they are sent as an array ref'; # is this right? |
| 54 | | is respect( my @a = 1, 2, 3 ), 3, '...and when the array is declared in the argument list'; |