ri...@happyleptic.org wrote:
> > 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 ?
The anonymous function in the second version of Martin's function doesn't
"call" [f] (at least directly): imag
> 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:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-
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 lifetim
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 sev
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), and you can
On Mon, Aug 24, 2009 at 3:15 PM, Warren Harris wrote:
>> Lazy cells don't just defer, they also memoize the returned value once
>> the cell is forced.
>
> Thanks Jake - I guess I overlooked that in the manual.
Hope you're doing well. Best of luck on the CUFP talk.
Jake
__
On Aug 24, 2009, at 3:04 PM, Jake Donham wrote:
Lazy cells don't just defer, they also memoize the returned value once
the cell is forced.
Thanks Jake - I guess I overlooked that in the manual.
Warren
___
Caml-list mailing list. Subscription mana
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.
>
On Mon, Aug 24, 2009 at 2:57 PM, Warren Harris 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 defer, the
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
___
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 pa
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.
You can do tha
13 matches
Mail list logo