bryan.burgers at gmail.com
Tue Jun 13 19:34:33 EDT 2006
On 6/13/06, Jenny678 <mestor1 at gmx.de> wrote:
> I search a code for
> I have a code
> elements_in_List :: Eq a => [a] -> [a] -> Bool
> elements_in_List  _ = True
> elements_in_List _  = False
> elements_in_List (x:xs) (y:ys)
> | x == y = elements_in_List xs ys
> | True = elements_in_List (x:xs) ys
> but it failed at
> I hope somebody can help me
> Please don't use built-in-Functions.
> Thanks for Help
I haven't looked too far into this, but how about something like this:
elements_in_list a b = and $ map (\x -> element_in_list x b) a
where element_in_list = ...
Maybe if you don't want to use built-in functions, define your own
'and' as well.
More information about the Haskell-Cafe