📜  haskell 是列表中的元素 - Haskell 代码示例

📅  最后修改于: 2022-03-11 14:53:35.149000             🧑  作者: Mango

代码示例1
-- (first:rest)

elemIn :: (Eq a) => a -> [a] -> Bool
elemIn _ [] = False
elemIn n (x:xs) = (x == n) || (elemIn n xs)