> You can achieve something similar with the ViewPatterns language > extension. > > member _ [] = False > member x (((x ==) -> True) : _) = True > member x (_ : xs) = member x xs Hi Tillmann,
there are a couple of ways to achieve this in Haskell, for example using guards: member :: Eq a => a -> [a] -> Bool member _ [] = False member y (x:_) | x == y = True member y (_:xs) = member y xs The goal of my proposal is to provide a concise syntax, whereas ViewPatterns are very verbose and guards are slightly verbose. I want something simple and something that is very intuitive if you've programmed in Prolog :) Janek _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe