有了这个定义:
member _ [] = False
member x (h:t) = if x == h then True else member x t
PAKCS 2.0.1(来自 Ubuntu 18.04)没有给出答案、警告或错误:
Top-level binding with no type signature:
member :: Prelude.Eq a => a -> [a] -> Prelude.Bool
member> member x [1, 2, 3] =:= True where x free
member>
我希望看到 3 个值。我在这里做错了什么?