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: | John Goerzen <jgoerzen@c...> |
| Subject: | Re: [Caml-list] [ANN] The Missing Library |
On Wed, Apr 28, 2004 at 09:24:43PM +1000, skaller wrote: > On Wed, 2004-04-28 at 19:18, Jon Harrop wrote: > Control inversion. In Ocaml you can write: > > List.iter (fun x -> print_endline x) ["Hello"; "World"];; [ snip ] > while ( p != e) do print_endline (get p); incr p done; [ snip ] > > The List.iter style HOF is very limited in utility > in a functional language: there is no state. > In Ocaml you can add state of course. But it's a mess. I don't find it all that problematic. For one, you can just maintain the state in the scope above the callback. The callback has access to all those variables, of course. And you could always just pass whatever object or record you like in to the callback. Neither is all that complex to me. ------------------- 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