On 17.11.2006 19:51 Valentin Gjorgjioski wrote:
So, this algorithm should work fine for you

buildCouples :: [Int]->Int->[(Int,Int)]
buildCouples (x:[]) s = [(x,s)]
buildCouples (x:xs) s = [(x,s)] ++ (buildCouples xs (x+s)).
Please ignore the . at the end, it is a typo :( Sorry again...

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

Reply via email to