Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
head :: [a] -> a
Extract the first element of a list, which must be non-empty.
last :: [a] -> a
Extract the last element of a list, which must be finite and non-empty.
tail :: [a] -> [a]
Extract the elements after the head of a list, which must be non-empty.
init :: [a] -> [a]
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.
foldl1 :: (a -> a -> a) -> [a] -> a
foldr1 :: (a -> a -> a) -> [a] -> a
scanl1 :: (a -> a -> a) -> [a] -> [a]