take first element of list and place in first element of another list haskell code example
Example: first element in list haskell
list = [1, 2, 3]
head :: [a] -> a
head (x:_) = x
head list -- 1
list = [1, 2, 3]
head :: [a] -> a
head (x:_) = x
head list -- 1