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.
- last :: HasCallStack => [a] -> a- numeric-prelude - NumericPrelude.Base - 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] -> a- numhask - NumHask.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 :: ListLike full item => full -> item- ListLike - Data.ListLike - Extracts the last element of a ListLike. 
- last :: ListLike full item => full -> item- ListLike - Data.ListLike.Base - Extracts the last element of a ListLike. 
- last :: HasCallStack => [a] -> a- basic-prelude - BasicPrelude - 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] -> a- ghc-lib-parser - GHC.Prelude.Basic - 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 :: Sequential c => NonEmpty c -> Element c- foundation - Foundation - get the last element of a non-empty collection 
- last :: Sequential c => NonEmpty c -> Element c- foundation - Foundation.Collection - get the last element of a non-empty collection 
- 
nonempty-containers Data.Sequence.NonEmpty O(1). Retrieve the right-most item in a non-empty sequence. Note that this function is total. 
- 
prelude-compat Data.List2010 No documentation available. 
