Perl Sq: bind & cartesian
The cartesian function returns the Cartesian Product. The Cartesian
Product is the combination of all possible values.
|
|
Calling to_array will evaluate the expression and generates the following
Perl data-structure.
|
|
The implementation of Seq::cartesian.
|
|
wrap('Seq', [$a, $b]) is the same as Seq->wrap([$a, $b]).
This is how you can implement cartesian in a non-lazy way.
|
|
and call it.
|
|