Question : haskell is element in list
Answered by : horrible-hamerkop-qv91dqprmbxt
-- (first:rest)
elemIn :: (Eq a) => a -> [a] -> Bool
elemIn _ [] = False
elemIn n (x:xs) = (x == n) || (elemIn n xs)
Source : https://programming-idioms.org/idiom/12/check-if-list-contains-a-value/800/haskell | Last Update : Tue, 13 Apr 21