Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
Agda Agda.Utils.List init, safe. O(n).
-
Agda Agda.Utils.List Last element (safe). O(n).
mapMaybeAndRest :: (a -> Maybe b) -> [a] -> ([b], Suffix a)Agda Agda.Utils.List Like mapMaybe, but additionally return the last partition of the list where the function always returns Nothing. O(n).
partitionMaybe :: (a -> Maybe b) -> [a] -> ([a], [b])Agda Agda.Utils.List Partition a list into Nothings and Justs. O(n).
partitionMaybe f = partitionEithers . map ( a -> maybe (Left a) Right (f a))
Note: mapMaybe f = snd . partitionMaybe f.-
Agda Agda.Utils.List Tail function (safe). O(1).
catMaybes :: List1 (Maybe a) -> [a]Agda Agda.Utils.List1 Like catMaybes.
mapMaybe :: (a -> Maybe b) -> List1 a -> [b]Agda Agda.Utils.List1 Like mapMaybe.
fromList1Maybe :: List1 a -> Maybe (List2 a)Agda Agda.Utils.List2 Safe. O(1).
fromListMaybe :: [a] -> Maybe (List2 a)Agda Agda.Utils.List2 Safe. O(1).
boolToMaybe :: Bool -> a -> Maybe aAgda Agda.Utils.Maybe Retain object when tag is True.