:: [a] -> (a -> Maybe b) -> [b] package:LambdaHack

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.