Browse thread
[Caml-list] [ANN] The Missing Library
-
John Goerzen
-
Kenneth Knowles
- Alexander V. Voinov
-
John Goerzen
-
Maxence Guesdon
-
John Goerzen
- Maxence Guesdon
-
John Goerzen
-
Alain.Frisch@e...
-
John Goerzen
-
Alain.Frisch@e...
-
Nicolas Cannasse
-
Yamagata Yoriyuki
- Gerd Stolpmann
-
Nicolas Cannasse
-
Yamagata Yoriyuki
- Jacques GARRIGUE
- Nicolas Cannasse
-
Yamagata Yoriyuki
-
Yamagata Yoriyuki
-
Nicolas Cannasse
- oliver@f...
-
Alain.Frisch@e...
-
John Goerzen
- Henri DF
- Shawn Wagner
- james woodyatt
-
Alain.Frisch@e...
- Basile STARYNKEVITCH
-
John Goerzen
- Kenneth Knowles
- Florian Hars
-
Maxence Guesdon
- Eric C. Cooper
-
Kenneth Knowles
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] [ANN] The Missing Library |
On Thu, 2004-04-29 at 00:40, Jean-Christophe Filliatre wrote: > skaller writes: > > > > Perhaps the iterator is actually the triple: > > > > (iterator, step, get) > > In the particular case of ocamlgraph, the iterators are not > implemented as functions triples (though they could be). I meant that 'mathematically' the actual iterator is a triple. You need to specify more than the 'iterator value' to specify an iterator: you need its methods too. Similar to 'cartesian product' is not a value, but a value and a pair of projection functions. Categorically .. the value is an irrelavance: only the functions *actually* matter .. so perhaps an iterator *really* is just a pair: step:unit->unit get: unit->'a which is what Andreas Rossburg said earlier, except he combined 'step' into 'get' and added a termination condition: get: unit -> 'a option Example is the well known function 'get_token()' used by parsers. Actually, this is an input iterator. Step/get is a forward iterator. Input iterators have no interesting semantics, they don't have enough structure. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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