Hoogle Search

Within LTS Haskell 24.66 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. headMay :: [a] -> Maybe a

    protolude Protolude.Safe

    No documentation available.

  2. lastMay :: [a] -> Maybe a

    protolude Protolude.Safe

    No documentation available.

  3. listToMaybe :: [a] -> Maybe a

    basic-prelude CorePrelude

    The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

    Examples

    Basic usage:
    >>> listToMaybe []
    Nothing
    
    >>> listToMaybe [9]
    Just 9
    
    >>> listToMaybe [1,2,3]
    Just 1
    
    Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:
    >>> maybeToList $ listToMaybe [5]
    [5]
    
    >>> maybeToList $ listToMaybe []
    []
    
    But not on lists with more than one element:
    >>> maybeToList $ listToMaybe [1,2,3]
    [1]
    

  4. listToMaybe :: [a] -> Maybe a

    classy-prelude ClassyPrelude

    The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

    Examples

    Basic usage:
    >>> listToMaybe []
    Nothing
    
    >>> listToMaybe [9]
    Just 9
    
    >>> listToMaybe [1,2,3]
    Just 1
    
    Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:
    >>> maybeToList $ listToMaybe [5]
    [5]
    
    >>> maybeToList $ listToMaybe []
    []
    
    But not on lists with more than one element:
    >>> maybeToList $ listToMaybe [1,2,3]
    [1]
    

  5. lastMaybe :: [a] -> Maybe a

    ghc-lib-parser GHC.Utils.Misc

    No documentation available.

  6. listToMaybe :: [a] -> Maybe a

    foundation Foundation

    The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

    Examples

    Basic usage:
    >>> listToMaybe []
    Nothing
    
    >>> listToMaybe [9]
    Just 9
    
    >>> listToMaybe [1,2,3]
    Just 1
    
    Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:
    >>> maybeToList $ listToMaybe [5]
    [5]
    
    >>> maybeToList $ listToMaybe []
    []
    
    But not on lists with more than one element:
    >>> maybeToList $ listToMaybe [1,2,3]
    [1]
    

  7. headMay :: [a] -> Maybe a

    hledger Hledger.Cli.Script

    No documentation available.

  8. lastMay :: [a] -> Maybe a

    hledger Hledger.Cli.Script

    No documentation available.

  9. listToMaybe :: [a] -> Maybe a

    cabal-install-solver Distribution.Solver.Compat.Prelude

    The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

    Examples

    Basic usage:
    >>> listToMaybe []
    Nothing
    
    >>> listToMaybe [9]
    Just 9
    
    >>> listToMaybe [1,2,3]
    Just 1
    
    Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:
    >>> maybeToList $ listToMaybe [5]
    [5]
    
    >>> maybeToList $ listToMaybe []
    []
    
    But not on lists with more than one element:
    >>> maybeToList $ listToMaybe [1,2,3]
    [1]
    

  10. headMay :: [a] -> Maybe a

    ihaskell IHaskellPrelude

    No documentation available.

Page 3 of many | Previous | Next