Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

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

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

    hedgehog Hedgehog.Internal.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 :: NonEmpty a -> a

    base-compat Data.List.NonEmpty.Compat

    Extract the last element of the stream.

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

    ghc GHC.Prelude.Basic

    No documentation available.

  4. last :: Monad m => Producer a m () -> m (Maybe a)

    pipes Pipes.Prelude

    Retrieve the last element from a Producer

  5. last :: Fold a (Maybe a)

    foldl Control.Foldl

    Get the last element of a container or return Nothing if the container is empty

  6. last :: Fold ByteString (Maybe Word8)

    foldl Control.Foldl.ByteString

    Get the last byte of a byte stream or return Nothing if the byte stream is empty

  7. last :: Fold1 a a

    foldl Control.Foldl.NonEmpty

    Get the last element of a non-empty container

  8. last :: Fold Text (Maybe Char)

    foldl Control.Foldl.Text

    Get the last character of a text stream or return Nothing if the text stream is empty

  9. last :: ShortText -> Char

    text-short Data.Text.Short.Partial

    Return last character from non-empty ShortText.

    >>> last "abcd"
    'd'
    
    Note: Will throw an error exception for empty ShortTexts. Consider using the total functions unsnoc or indexEndMaybe instead.

  10. last :: forall (f :: Type -> Type) a . Foldable f => T f a -> a

    non-empty Data.NonEmpty

    No documentation available.

Page 7 of many | Previous | Next