Answers for "get n first element of list "haskell""

2

first element in list haskell

list = [1, 2, 3]

head :: [a] -> a
head (x:_) = x

head list -- 1
Posted by: Guest on October-18-2020

Code answers related to "get n first element of list "haskell""

Browse Popular Code Answers by Language