> > let output elem = Printf.printf "%d "
elem in
> > let a = int_of_string Sys.argv.(1)
> > and b = int_of_string Sys.argv.(2) in
> > List.iter output (range a b c);;
>
> Is there a particular advantage to using let above as
opposed to
> another let ... in?
Not that I know of. It may let the compiler optimise it
somehow, as
the evaluation order of the bindings is now decided by the
compiler.
When evaluation order matters, you must use let .. in let
... in
rather than let .. and ... in.
Jonathan
Archives up to August 22, 2005 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
The archives of the very official ocaml list (the seniors'
one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid
flames etc.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http:/
/groups.yahoo.com/group/ocaml_beginners/
<*> To unsubscribe from this group, send an email to:
ocaml_beginners-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|