Skip to content
Prev 15346 / 63424 Next

Bug in handling of promises?

On Tue, 8 Mar 2005 17:44:41 +0000 (GMT), Prof Brian Ripley
<ripley@stats.ox.ac.uk> wrote :
Yes, but it also says that it "forces the evaluation of a function
argument", which is what I was trying to do.

But mainly what may be a bug is the fact that H was available in env
but its value was not, even though it had already been evaluated in
that environment.  

My examples were unnecessarily complicated last time, because they
were too much like the original.  Here are simpler versions:
+     cat('Evaluate H to get ', H, '\n')
+     return(environment())
+ }
Evaluate H to get  1
<promise: 0118BF1C>
+     force(H)
+     return(environment())
+ }
<promise: 0118A148>
+     H <- H
+     return(environment())
+ }
[1] 3

Duncan Murdoch