| Safe Haskell | Unsafe |
|---|---|
| Language | Haskell2010 |
Relude.Unsafe
Description
Unsafe functions to work with lists and Maybe.
Sometimes unavoidable but better don't use them. This module
is intended to be imported qualified and it's not even included
in default prelude exports.
import qualified Relude.Unsafe as Unsafe foo :: [a] -> a foo = Unsafe.head
Documentation
Return all the elements of a list except the last one. The list must be non-empty.
(!!) :: [a] -> Int -> a infixl 9 #
List index (subscript) operator, starting from 0.
It is an instance of the more general genericIndex,
which takes an index of any integral type.