Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. last :: HasCallStack => [a] -> a

    numhask NumHask.Prelude

    Extract the last element of a list, which must be finite and non-empty. WARNING: This function is partial. Consider using unsnoc instead.

    Examples

    >>> last [1, 2, 3]
    3
    
    >>> last [1..]
    * Hangs forever *
    
    >>> last []
    *** Exception: Prelude.last: empty list
    

  2. last :: ListLike full item => full -> item

    ListLike Data.ListLike

    Extracts the last element of a ListLike.

  3. last :: ListLike full item => full -> item

    ListLike Data.ListLike.Base

    Extracts the last element of a ListLike.

  4. last :: HasCallStack => [a] -> a

    basic-prelude BasicPrelude

    Extract the last element of a list, which must be finite and non-empty. WARNING: This function is partial. Consider using unsnoc instead.

    Examples

    >>> last [1, 2, 3]
    3
    
    >>> last [1..]
    * Hangs forever *
    
    >>> last []
    *** Exception: Prelude.last: empty list
    

  5. last :: HasCallStack => [a] -> a

    ghc-lib-parser GHC.Prelude.Basic

    Extract the last element of a list, which must be finite and non-empty. WARNING: This function is partial. Consider using unsnoc instead.

    Examples

    >>> last [1, 2, 3]
    3
    
    >>> last [1..]
    * Hangs forever *
    
    >>> last []
    *** Exception: Prelude.last: empty list
    

  6. last :: Sequential c => NonEmpty c -> Element c

    foundation Foundation

    get the last element of a non-empty collection

  7. last :: Sequential c => NonEmpty c -> Element c

    foundation Foundation.Collection

    get the last element of a non-empty collection

  8. last :: NESeq a -> a

    nonempty-containers Data.Sequence.NonEmpty

    O(1). Retrieve the right-most item in a non-empty sequence. Note that this function is total.

  9. last :: [a] -> a

    prelude-compat Data.List2010

    No documentation available.

  10. last :: [a] -> a

    prelude-compat Prelude2010

    No documentation available.

Page 12 of many | Previous | Next