Question : first element in list haskell
Answered by : hippoerror
list = [1, 2, 3]
head :: [a] -> a
head (x:_) = x
head list -- 1
Source : | Last Update : Sun, 25 Oct 20
Question : remove first element list haskell
Answered by : marton
a = [1, 2, 3, 4]
b = tail a
-- b == [2, 3, 4]
Source : https://wiki.haskell.org/How_to_work_on_lists | Last Update : Wed, 21 Oct 20