MODULE REFERENCE
Data.List
Finite, ordered collections with structural recursion and total projections.
SYNOPSIS
Types and classes
data List aA finite sequence of values of the same type.
Functions and values
map :: forall a b. (a -> b) -> List a -> List bTransform each element, retaining the order of the input.
EXAMPLE
map (\x -> x * 2) [1, 2, 3]
-- [2, 4, 6]foldr :: forall a b. (a -> b -> b) -> b -> List a -> bFold a list from the right using a combining function and an initial value.
length :: forall a. List a -> NatCount the elements in a finite list.
EXAMPLE
length [1, 2, 3]
-- 3head :: forall a. List a -> Option aReturn the first element when present. An empty list produces None.
EXAMPLE
head []
-- Nonefilter :: forall a. (a -> Bool) -> List a -> List aRetain elements that satisfy the predicate, in their original order.
