Hoogle Search

Within LTS Haskell 24.17 (ghc-9.10.3)

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

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

    base GHC.List

    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 :: HasCallStack => ByteString -> Word8

    bytestring Data.ByteString

    O(1) Extract the last element of a ByteString, which must be finite and non-empty. An exception will be thrown in the case of an empty ByteString. This is a partial function, consider using unsnoc instead.

  3. last :: ByteString -> Char

    bytestring Data.ByteString.Char8

    O(1) Extract the last element of a packed string, which must be non-empty.

  4. last :: HasCallStack => ByteString -> Word8

    bytestring Data.ByteString.Lazy

    O(n/c) Extract the last element of a ByteString, which must be finite and non-empty. This is a partial function, consider using unsnoc instead.

  5. last :: ByteString -> Char

    bytestring Data.ByteString.Lazy.Char8

    O(1) Extract the last element of a packed string, which must be non-empty.

  6. last :: HasCallStack => ShortByteString -> Word8

    bytestring Data.ByteString.Short

    O(1) Extract the last element of a ShortByteString, which must be finite and non-empty. An exception will be thrown in the case of an empty ShortByteString. This is a partial function, consider using unsnoc instead.

  7. last :: HasCallStack => ShortByteString -> Word8

    bytestring Data.ByteString.Short.Internal

    O(1) Extract the last element of a ShortByteString, which must be finite and non-empty. An exception will be thrown in the case of an empty ShortByteString. This is a partial function, consider using unsnoc instead.

  8. last :: HasCallStack => Text -> Char

    text Data.Text

    O(1) Returns the last character of a Text, which must be non-empty. This is a partial function, consider using unsnoc instead.

  9. last :: HasCallStack => Stream Char -> Char

    text Data.Text.Internal.Fusion.Common

    O(n) Returns the last character of a Stream Char, which must be non-empty. Properties

    last . stream = last
    

  10. last :: HasCallStack => Text -> Char

    text Data.Text.Lazy

    O(n/c) Returns the last character of a Text, which must be non-empty. This is a partial function, consider using unsnoc instead.

Page 6 of many | Previous | Next