Pascal Cuoq a écrit :
Elnatan Reisner wrote:
Is there something that can complete this analogy:
(=) is to (==) as Pervasives.compare is to ___?
The simple solution is to number at creation the objects that you want to
physically compare, using an additional field.
You can do that while
Hello,
On Thu, Aug 06, 2009 at 01:16:35PM +0200, ChoJin wrote:
I have an issue while using OCamlMakefile, menhir and its --infer
option.
I don't know if OCamlMakefile properly supports menhir with the --infer
option.
The simplest solution to your problem would be to use ocamlbuild instead
Pascal Cuoq a écrit :
Elnatan Reisner wrote:
Is there something that can complete this analogy:
(=) is to (==) as Pervasives.compare is to ___?
The simple solution is to number at creation the objects that you
want to
physically compare, using an additional field.
Since people are still
Is there any advantage to using lazy evaluation in ocaml rather than
just using thunks to defer evaluation? E.g.
let x = lazy (3+4)
let y = Lazy.force x
vs:
let x = fun () - 3+4
let y = x ()
Perhaps it's just that the type int lazy_t is more informative than
unit - int?
Warren
On Mon, Aug 24, 2009 at 2:57 PM, Warren Harriswar...@metaweb.com wrote:
Is there any advantage to using lazy evaluation in ocaml rather than just
using thunks to defer evaluation? E.g.
let x = lazy (3+4)
let y = Lazy.force x
vs:
let x = fun () - 3+4
let y = x ()
Lazy cells don't just
Warren Harris a écrit :
Is there any advantage to using lazy evaluation in ocaml rather than
just using thunks to defer evaluation? [...]
Two things I can think of right now: they are evaluated only once (even
if you call Lazy.force several times), and you can do pattern matching
with them.
Martin Jambon wrote:
Stéphane Glondu wrote:
Warren Harris a écrit :
Is there any advantage to using lazy evaluation in ocaml rather than
just using thunks to defer evaluation? [...]
Two things I can think of right now: they are evaluated only once (even
if you call Lazy.force several times),
On Aug 24, 2009, at 4:11 PM, Martin Jambon wrote:
Oops.
The following makes it possible for f to be garbage-collected:
[...]
If I understand correctly, the closure associated with f will be
collectable after the lazy_t is forced, whereas before its lifetime
would be bound to the
Oops.
The following makes it possible for f to be garbage-collected:
...?
Because the fact that the fun calls f does not count as a reference ?
___
Caml-list mailing list. Subscription management: