Version française
Home     About     Download     Resources     Contact us    
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: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] [ANN] The Missing Library
On 28 Apr 2004, at 04:24, skaller wrote:
>
> to say another way: an iterator IS just a control inverted
> HOF, indeed, the (abstraction of) the List.iter HOF.

Also not precisely true, since iterators are typically lazy evaluations 
of the underlying container.  It would be more precise to say that they 
are an abstraction of the FStream module in the CamlP4 distribution.  
(I have a similar module in my Cf library, called Cf_seq, which I think 
offers more functionality, so that's what I use.)  It's possible to do 
a whole helluva lot with lazily evaluated functional streams and 
monadic programming.

With Ocaml, monadic programming is a little more convoluted than with 
Haskell, but it's not at all out of the bounds of reality.  I do it all 
the time, and I don't miss the C++ STL (or Stepanov's original work) 
even a little bit.  In fact, I suspect there are things I would 
consider trivial to do with monads and functional streams that the C++ 
STL just falls down and dies when you try to torture it into allowing.


-- 
j h woodyatt <jhw@wetware.com>
markets are only free to the people who own them.

-------------------
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