loop through the list...

Ketil Z. Malde ketil@ii.uib.no
11 Aug 2003 09:03:41 +0200


"Fredrik Petersson" <fredde@x-web.se> writes:

> something like [if (thenumber < index) then (index,int+1) \and break\ else
> (index,int) | (index,int) <- [thelist]]

I think you need to write an explicit recursion, instead of using a
list comprehension. 

> Can i use some help-boolean to set it false when we have counted up once?

Using a fold(r|l) would be similar, but I think you'd be better
advised at this point to write the recursion explicitly.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants