English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2004-04-29 (12:31)
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, rossberg@ps.uni-sb.de

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

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners