The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
call/cc seems to be working!
[scheme.forth.jl.git]
/
src
/
scheme-primitives.4th
diff --git
a/src/scheme-primitives.4th
b/src/scheme-primitives.4th
index
183efec
..
a9b4741
100644
(file)
--- a/
src/scheme-primitives.4th
+++ b/
src/scheme-primitives.4th
@@
-280,6
+280,13
@@
drop swap drop f> boolean-type
; 2 make-fa-primitive flo:>
drop swap drop f> boolean-type
; 2 make-fa-primitive flo:>
+:noname ( flonum flonum -- bool )
+ drop swap drop f<= boolean-type
+; 2 make-fa-primitive flo:<=
+
+:noname ( flonum flonum -- bool )
+ drop swap drop f>= boolean-type
+; 2 make-fa-primitive flo:>=
:noname ( flonum -- bool )
drop 0.0 = boolean-type
:noname ( flonum -- bool )
drop 0.0 = boolean-type
@@
-592,13
+599,27
@@
defer display
\ ==== Evaluation ==== {{{
\ ==== Evaluation ==== {{{
-\ :noname ( args -- result )
-\ 2dup car 2swap cdr
-\
-\ nil? false = if car then ( proc argvals )
-\
-\ apply
-\ ; make-primitive apply
+:noname ( args -- result )
+ 2dup car 2swap cdr
+
+ nil? false = if car then ( proc argvals )
+
+ 2swap apply
+; make-primitive apply
+
+:noname ( proc -- result )
+ make-continuation
+
+ drop if
+ nil cons
+ 2swap apply
+ else
+ 2swap 2drop
+ then
+
+ trace
+
+; 1 make-fa-primitive call-with-current-continuation
\ }}}
\ }}}