平行理解
使用 Parallel List Comprehensions 語言擴充套件,
[(x,y) | x <- xs | y <- ys]
相當於
zip xs ys
例:
[(x,y) | x <- [1,2,3] | y <- [10,20]]
-- [(1,10),(2,20)]
使用 Parallel List Comprehensions 語言擴充套件,
[(x,y) | x <- xs | y <- ys]
相當於
zip xs ys
例:
[(x,y) | x <- [1,2,3] | y <- [10,20]]
-- [(1,10),(2,20)]