$ perl -le 'open( my $ghci, "|-", "ghci" );print $ghci q{[ (x,y,z) | x + <- [0..1], y <- [2..4], z <- [5..8] ]}, "\n";' GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package ffi-1.0 ... linking ... done. Prelude> [(0,2,5),(0,2,6),(0,2,7),(0,2,8),(0,3,5),(0,3,6),(0,3,7),(0,3 +,8),(0,4,5),(0,4,6),(0,4,7),(0,4,8),(1,2,5),(1,2,6),(1,2,7),(1,2,8),( +1,3,5),(1,3,6),(1,3,7),(1,3,8),(1,4,5),(1,4,6),(1,4,7),(1,4,8)] Prelude> Prelude> Leaving GHCi.
</snark>
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Combinations of multiple arrays
by Fletch
in thread Combinations of multiple arrays
by yuri123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |