[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: [Q] On Implementing Continuation...

From: Paolo Bonzini
Subject: [Help-smalltalk] Re: [Q] On Implementing Continuation...
Date: Tue, 06 Mar 2007 09:00:08 +0100
User-agent: Thunderbird (Macintosh/20070221)

I suggest that you replace your with the file 
examples/ in GNU Smalltalk's distribution, applying this patch 
which I just committed to both 2.3 and trunk.



--- orig/examples/
+++ mod/examples/
@@ -58,6 +58,12 @@ valueWithArguments: v
 !Continuation class methodsFor: 'instance creation'!
+    ^self fromContext: thisContext sender!
+currentDo: aBlock
+    ^aBlock value: (self fromContext: thisContext sender)!
 fromContext: aStack
     ^self new stack: aStack copyStack! !
@@ -99,6 +105,6 @@ copyStack
        ifTrue:[^self copy]
        ifFalse: [^self copy parentContext: self parentContext copyStack]! !
-(Continuation factorialExample: 4) printNl!
-(Undeclared.RetryCC value: 10) printNl!
-Undeclared removeKey: #RetryCC!
+"(Continuation factorialExample: 4) printNl!"
+"(Undeclared.RetryCC value: 10) printNl!"
+"Undeclared removeKey: #RetryCC!"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]