protolude-0.3.0: A small prelude.

Safe HaskellSafe
LanguageHaskell2010

Protolude.Safe

Documentation

headMay :: [a] -> Maybe a Source #

headDef :: a -> [a] -> a Source #

initMay :: [a] -> Maybe [a] Source #

initDef :: [a] -> [a] -> [a] Source #

initSafe :: [a] -> [a] Source #

tailMay :: [a] -> Maybe [a] Source #

tailDef :: [a] -> [a] -> [a] Source #

tailSafe :: [a] -> [a] Source #

lastDef :: a -> [a] -> a Source #

lastMay :: [a] -> Maybe a Source #

foldr1May :: (a -> a -> a) -> [a] -> Maybe a Source #

foldl1May :: (a -> a -> a) -> [a] -> Maybe a Source #

foldl1May' :: (a -> a -> a) -> [a] -> Maybe a Source #

maximumMay :: Ord a => [a] -> Maybe a Source #

minimumMay :: Ord a => [a] -> Maybe a Source #

maximumDef :: Ord a => a -> [a] -> a Source #

minimumDef :: Ord a => a -> [a] -> a Source #

atMay :: [a] -> Int -> Maybe a Source #

atDef :: a -> [a] -> Int -> a Source #