Hoogle Search
Within LTS Haskell 24.18 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
last :: HasCallStack => [a] -> aLambdaHack 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
-
cabal-install-solver Distribution.Solver.Compat.Prelude Extract the last element of the stream.
-
incipit-base Incipit.List Return Just the last element of a list.
last :: LRU key val -> !Maybe keylrucache Data.Cache.LRU.Internal the key of the least recently accessed entry
last :: forall (m :: Type -> Type) a . Monad m => Fold m a (Maybe a)streamly-core Streamly.Data.Fold Deprecated: Please use latest instead.
last :: Unbox a => Array a -> Maybe astreamly-core Streamly.Internal.Data.Array >>> last arr = Array.getIndexRev arr 0
Pre-releaselast :: forall (m :: Type -> Type) a . Monad m => Fold m a (Maybe a)streamly-core Streamly.Internal.Data.Fold Deprecated: Please use latest instead.
last :: Monad m => Stream m a -> m (Maybe a)streamly-core Streamly.Internal.Data.Stream No documentation available.
last :: Monad m => StreamK m a -> m (Maybe a)streamly-core Streamly.Internal.Data.StreamK Extract the last element of the stream, if any.
last :: (HasCallStack, Monad m) => Stream m a -> m avector-stream Data.Stream.Monadic Last element of the Stream or error if empty