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.
last :: MonadReader (Deque a) m => m (Maybe a)deque Deque.Lazy.Reader , occasionally <math>. Get the last element if deque is not empty.
last :: MonadState (Deque a) m => m (Maybe a)deque Deque.Lazy.State , occasionally <math>. Get the last element if deque is not empty.
-
deque Deque.Strict , occasionally <math>. Get the last element if deque is not empty.
last :: MonadReader (Deque a) m => m (Maybe a)deque Deque.Strict.Reader , occasionally <math>. Get the last element if deque is not empty.
last :: MonadState (Deque a) m => m (Maybe a)deque Deque.Strict.State , occasionally <math>. Get the last element if deque is not empty.
last :: HasCallStack => [a] -> amixed-types-num Numeric.MixedTypes.PreludeHiding 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
-
nonempty-vector Data.Vector.NonEmpty O(1) Last element. Since a last element is gauranteed, bounds checks are bypassed by deferring to unsafeLast.
>>> last $ unsafeFromList [1..10] 10
-
strict-list StrictList Get the last element, if list is not empty.
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
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