Hoogle Search
Within LTS Haskell 24.39 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
catMaybes :: List l => l (Maybe a) -> l aList Data.List.Class No documentation available.
mapMaybe :: List l => (a -> Maybe b) -> l a -> l bList Data.List.Class No documentation available.
SchemaMaybe :: SchemaType' s ty -> SchemaType' s tyaeson-schemas Data.Aeson.Schema.Type No documentation available.
addMaybeProxy :: Maybe Proxy -> Request -> Requestauthenticate-oauth Web.Authenticate.OAuth No documentation available.
addMaybeProxy :: Maybe Proxy -> Request -> Requestauthenticate-oauth Web.Authenticate.OAuth.IO No documentation available.
bumpMaybe :: a -> (a -> b -> b) -> (a -> b) -> Maybe b -> Maybe bbackprop Numeric.Backprop.Internal No documentation available.
mapMaybe :: (a -> Maybe b) -> Trie a -> Maybe (Trie b)bcp47 Data.BCP47.Trie No documentation available.
mapMaybe :: (a -> Maybe b) -> Trie a -> Maybe (Trie b)bcp47 Data.BCP47.Trie.Internal No documentation available.
mapMaybe2 :: (a -> Maybe b) -> Trie2 a -> Maybe (Trie2 b)bcp47 Data.BCP47.Trie.Internal No documentation available.
-
cabal-install-solver Distribution.Solver.Compat.Prelude The catMaybes function takes a list of Maybes and returns a list of all the Just values.
Examples
Basic usage:>>> catMaybes [Just 1, Nothing, Just 3] [1,3]
When constructing a list of Maybe values, catMaybes can be used to return all of the "success" results (if the list is the result of a map, then mapMaybe would be more appropriate):>>> import GHC.Internal.Text.Read ( readMaybe ) >>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ] [Just 1,Nothing,Just 3] >>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ] [1,3]