--- a/Continuation.st Thu Jul 25 11:35:36 2013 +0200
+++ b/Continuation.st Thu Jul 25 11:37:35 2013 +0200
@@ -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,5 +191,6 @@
!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 $'
! !
+