In Haskell, the latter looks like:
alist = (map (**2) . filter (\x -> x `mod` 3 == 0)) myList
Or: alist = (map (**2) . filter ((== 0) . (`mod` 3))) myList
If alist is a transformation, and not applied to myList, it's cleaner: alist = map (**2) . filter ((== 0) . (`mod` 3))
Though Haskell also has list comprehensions, with more "mathy" syntax: alist = [x**2 | x <- mylist, x `mod` 3 == 0]Don't forget generator comprehensions which are almost identical to list comprehensions. But instead of evaluating the whole result set and returning it, they return a generator that you can then iterate over. Very neat stuff.
Compare:
to Plus python also has set comprehension and dict comprehension, which share essentially the same syntax.