import Data.Traversable main = do let a = traverse (\x -> if x > 4 then Just x else Nothing) [1..] print a print "done"