こういうのもできるのか。
Prelude> [x| x <- [0..3], y <- [0..3]] [0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3] Prelude> [y| x <- [0..3], y <- [0..3]] [0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
takatoh's blog – Learning programming languages.
こういうのもできるのか。
Prelude> [x| x <- [0..3], y <- [0..3]] [0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3] Prelude> [y| x <- [0..3], y <- [0..3]] [0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]