Answers for "get an element in a list haskell"

0

haskell is element in list

-- (first:rest)

elemIn :: (Eq a) => a -> [a] -> Bool
elemIn _ [] = False
elemIn n (x:xs) = (x == n) || (elemIn n xs)
Posted by: Guest on April-06-2021

Browse Popular Code Answers by Language