Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

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

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

    LambdaHack Game.LambdaHack.Core.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

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

    Extract the last element of the stream.

  3. last :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-prelude Clash.Explicit.Prelude

    Extract the last element of a vector

    >>> last (1:>2:>3:>Nil)
    3
    
    >>> last Nil
    <interactive>:...
    • Couldn't match type ‘1’ with ‘0’
    Expected: Vec (0 + 1) a
    Actual: Vec 0 a
    • In the first argument of ‘last’, namely ‘Nil’
    In the expression: last Nil
    In an equation for ‘it’: it = last Nil
    
    # 540 "srcClashSized/Vector.hs"

  4. last :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-prelude Clash.Explicit.Prelude.Safe

    Extract the last element of a vector

    >>> last (1:>2:>3:>Nil)
    3
    
    >>> last Nil
    <interactive>:...
    • Couldn't match type ‘1’ with ‘0’
    Expected: Vec (0 + 1) a
    Actual: Vec 0 a
    • In the first argument of ‘last’, namely ‘Nil’
    In the expression: last Nil
    In an equation for ‘it’: it = last Nil
    
    # 540 "srcClashSized/Vector.hs"

  5. last :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-prelude Clash.Prelude

    Extract the last element of a vector

    >>> last (1:>2:>3:>Nil)
    3
    
    >>> last Nil
    <interactive>:...
    • Couldn't match type ‘1’ with ‘0’
    Expected: Vec (0 + 1) a
    Actual: Vec 0 a
    • In the first argument of ‘last’, namely ‘Nil’
    In the expression: last Nil
    In an equation for ‘it’: it = last Nil
    
    # 540 "srcClashSized/Vector.hs"

  6. last :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-prelude Clash.Prelude.Safe

    Extract the last element of a vector

    >>> last (1:>2:>3:>Nil)
    3
    
    >>> last Nil
    <interactive>:...
    • Couldn't match type ‘1’ with ‘0’
    Expected: Vec (0 + 1) a
    Actual: Vec 0 a
    • In the first argument of ‘last’, namely ‘Nil’
    In the expression: last Nil
    In an equation for ‘it’: it = last Nil
    
    # 540 "srcClashSized/Vector.hs"

  7. last :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-prelude Clash.Sized.Vector

    Extract the last element of a vector

    >>> last (1:>2:>3:>Nil)
    3
    
    >>> last Nil
    <interactive>:...
    • Couldn't match type ‘1’ with ‘0’
    Expected: Vec (0 + 1) a
    Actual: Vec 0 a
    • In the first argument of ‘last’, namely ‘Nil’
    In the expression: last Nil
    In an equation for ‘it’: it = last Nil
    
    # 540 "srcClashSized/Vector.hs"

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

    incipit-base Incipit.List

    Return Just the last element of a list.

  9. last :: LRU key val -> !Maybe key

    lrucache Data.Cache.LRU.Internal

    the key of the least recently accessed entry

  10. last :: forall (m :: Type -> Type) a . Monad m => Fold m a (Maybe a)

    streamly-core Streamly.Data.Fold

    Deprecated: Please use latest instead.

Page 15 of many | Previous | Next