suztomoの日記

To be a good software engineer

catMaybes

CatMaybes concatenates maybe values in a list into one list.

*Main> :t catMaybes
catMaybes :: [Maybe a] -> [a]
*Main> catMaybes [Just "a", Nothing, Nothing, Just "b"]
["a","b"]
Remove all ads