Safe Haskell | Safe-Inferred |
---|
Extra functions for dealing with lists.
Documentation
list :: b -> ([a] -> b) -> [a] -> bSource
When a list is non-null, pass it to a function, otherwise use the default.
lastToMaybe :: [a] -> Maybe aSource
Maybe get the last element in the list.