Parallel list comprahensions
25 Apr
2006
25 Apr
'06
5:29 p.m.
Hello, Does the parallel list comprahension notation support guards that involve both variables that are being generated? I was trying to write something that is essentially: [ f x y | (x,y) <- zip xs ys, p x y ] and I thought that it would be nice to rewrite it as a parallel list comprahension, but I am stuck on the `p x y` part. I can define my own function to do that: pzip f p xs ys = concat (zipWith zipper xs ys) where zipper x y = if p x y then [f x y] else [] or use the normal list comprahension version so it is not a problem, but I thought I'd check if there already was a notation that I didn't know about. -Iavor
7431
Age (days ago)
7431
Last active (days ago)
0 comments
1 participants
participants (1)
-
Iavor Diatchki