On Mon, 18 Feb 2008, TOPE KAREM wrote:

> Hello everyone,
> 
> I am just learning to program in Haskell, and I found recursion very
> interesting.
> However, I need to write a recursive function over two lists.
> 
> The function must  check the  elements in the  two lists and  return an
> element that is common to both lists if there is any.
> 
> Any assistance would be appreciated.
> 

Imagine for a moment that instead of "two lists" you have "a pair of 
lists", and thus each time you recurse you must generate a new pair of 
lists. After that it should be more or less business as usual if you're 
comfortable working on one list.

-- 
[EMAIL PROTECTED]

There is no magic bullet. There are, however, plenty of bullets that
magically home in on feet when not used in exactly the right circumstances.
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to