filter(lambda x: x<5, map(lambda x: 2*x, [1,2,3,4,5])) filter (<5) . map (*2) $ [1,2,3,4,5]
Same with comprehensions (although nesting comprehensions will always get weird).
[x for x in [2*x for x in [1,2,3,4,5]] if x<5] [x | x <- [2*x | x <- [1,2,3,4,5]], x<5]
Same with comprehensions (although nesting comprehensions will always get weird).