how to check if an element is in a list haskell code example
Example: haskell is element in list
-- (first:rest)
elemIn :: (Eq a) => a -> [a] -> Bool
elemIn _ [] = False
elemIn n (x:xs) = (x == n) || (elemIn n xs)
-- (first:rest)
elemIn :: (Eq a) => a -> [a] -> Bool
elemIn _ [] = False
elemIn n (x:xs) = (x == n) || (elemIn n xs)