--- a/Continuation.st Thu Jul 25 13:04:52 2013 +0100
+++ b/Continuation.st Thu Aug 01 10:22:20 2013 +0100
@@ -67,6 +67,8 @@
!Continuation class methodsFor:'instance creation'!
current
+ "this is called current-continuation in scheme"
+
|cont id|
cont := self basicNew.
@@ -76,12 +78,12 @@
__cId = __continuationCreate(cont);
if (__cId > 0) {
- id = __mkSmallInteger(__cId);
+ id = __mkSmallInteger(__cId);
}
%}.
id isNil ifTrue:[
- self error:'could not create continuation' mayProceed:true.
- ^ nil.
+ self error:'could not create continuation' mayProceed:true.
+ ^ nil.
].
cont setId:id process:(Processor activeProcess).
^ cont
@@ -90,13 +92,16 @@
self current
"
- "Modified: / 29-11-2006 / 10:12:35 / cg"
+ "Modified: / 25-07-2013 / 11:37:27 / cg"
!
currentDo: aBlock
+ "this is is called call/cc in scheme"
+
^ aBlock value:self current
"Modified: / 29-11-2006 / 10:14:03 / cg"
+ "Modified (comment): / 25-07-2013 / 11:37:00 / cg"
!
new
@@ -186,12 +191,10 @@
!Continuation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Continuation.st,v 1.15 2008/11/03 11:20:32 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Continuation.st,v 1.16 2013-07-25 09:37:35 cg Exp $'
!
version_SVN
^ '$Id: Continuation.st 10761 2012-01-19 11:46:00Z vranyj1 $'
! !
-
-