Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] [ANN] The Missing Library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: [Caml-list] [ANN] The Missing Library
skaller wrote:
> Indeed. If I may be so bold to observe .. you've control
> inverted. You're now driving the iteration. You've
> got rid of the HOF List.iter and implemented your own
> special one.

No, he has not. He is using fold to drive the iteration, which is just a 
more general variant of iter, that allows (1) threading some additional 
state and (2) incrementally constructing a result, although John's code 
is only making use of (1).

> The point of the code I displayed was that it
> control inverts *without* getting rid of the 
> driver loop.

I'm not sure I understand.

> Also .. a small bug in your translation: it prints "[]"
> for an empty list. The original prints "".

No, John's version does the same.


   - Andreas

Andreas Rossberg,

Let's get rid of those possible thingies!  -- TB

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: