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 => WindowsString -> WindowsChar- os-string - System.OsString.Windows - O(1) Extract the last element of a OsString, which must be finite and non-empty. An exception will be thrown in the case of an empty OsString. This is a partial function, consider using unsnoc instead. 
- last :: IsNonEmpty f a a "last" => f a -> a- relude - Relude.List.NonEmpty - O(n). Extracts the last element of a NonEmpty list. Actual type of this function is the following: - last :: NonEmpty a -> a but it was given a more complex type to provide friendlier compile time errors.- >>> last ('a' :| "bcde") 'e' >>> last [0..5 :: Int] ... ... 'last' works with 'NonEmpty', not ordinary lists. Possible fix: Replace: [Int] With: NonEmpty Int ... However, you can use 'last' with the ordinary lists. Apply 'viaNonEmpty' function from relude: viaNonEmpty last (yourList) Note, that this will return 'Maybe Int' therefore it is a safe function unlike 'last' from the standard Prelude ... >>> last (Just 'a') ... ... 'last' works with 'NonEmpty Char' lists But given: Maybe Char ...
- last :: HasCallStack => [a] -> a- relude - Relude.Unsafe - 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 :: Monad m => Stream (Of a) m r -> m (Of (Maybe a) r)- streaming - Streaming.Prelude - No documentation available. 
- last :: YiString -> Maybe Char- yi-rope - Yi.Rope - Take the last character of the underlying string if possible. 
- 
base-compat-batteries Data.List.NonEmpty.Compat Extract the last element of the stream. 
- last :: forall (v :: Type -> Type) (n :: Natural) a . Vector v a => Vector v (n + 1) a -> a- vector-sized - Data.Vector.Generic.Sized - O(1) Yield the last element of a non-empty vector. 
- last :: forall (n :: Natural) a . Prim a => Vector (n + 1) a -> a- vector-sized - Data.Vector.Primitive.Sized - O(1) Yield the last element of a non-empty vector. 
- last :: forall (n :: Natural) a . Vector (n + 1) a -> a- vector-sized - Data.Vector.Sized - O(1) Yield the last element of a non-empty vector. 
- last :: forall (n :: Natural) a . Storable a => Vector (n + 1) a -> a- vector-sized - Data.Vector.Storable.Sized - O(1) Yield the last element of a non-empty vector. 
