Perl 6 Perl 6 Lists and Arrays vivified #54

LoL (list-of-list) parameters

Used to collect a variable number of unflattened list arguments

Indicated with ** prefix on parameter

> sub abc(*@list)  { .say for @list }
> abc((1,2), (3,4), 5)   # flattens
1
2
3
4
5

> sub xyz(**@lol) { .say for @lol }
> xyz((1,2), (3,4), 5)   # keeps first-level args separate
1 2
3 4
5
Copyright © 2012
http://www.pmichaud.com/2012/pres/