On 08/11/2007, at 10:56 AM, [EMAIL PROTECTED] wrote:


rs 0 = [0]
rs 1 = [1]
rs n = rs (n-1) ++ rs (n-2)


Would somebody try to solve it, before I unveil the solution? It isn't
difficult.

Jerzy Karczmarczuk


Is this what you are looking for:

   mrs = [0] : [1] : zipWith (++) (tail mrs) mrs

then you can get the one you want with:

   mrs !! index

given a suitable value for index

Cheers,
Bernie.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to