first element in list haskell
list = [1, 2, 3] head :: [a] -> a head (x:_) = x head list -- 1
haskell append to list
1 : [2, 3] --return [1, 2, 3]
haskell access list element
--Haskell Lists' are 0 based --Let xs be a list from where we want the n-th element ?> xs !! n --Example ?> [1, 2, 3] !! 1 ?> 2