From: Tim Vaughan Date: Thu, 21 Jul 2016 08:52:17 +0000 (+1200) Subject: Fixed cons, set-car! and set-cdr! X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scheme.forth.jl.git;a=commitdiff_plain;h=659d7bdec81c23987b40c130008633e18f7001e7 Fixed cons, set-car! and set-cdr! --- diff --git a/scheme-primitives.4th b/scheme-primitives.4th index c1f3626..87cbdd4 100644 --- a/scheme-primitives.4th +++ b/scheme-primitives.4th @@ -221,14 +221,6 @@ cons ; make-primitive cons -:noname ( args -- pair ) - 2dup 1 ensure-arg-count - - - 2dup car 2swap cdr car - cons -; make-primitive cons - :noname ( args -- pair ) 2dup 1 ensure-arg-count car pair-type ensure-arg-type @@ -245,20 +237,20 @@ :noname ( args -- pair ) 2dup 2 ensure-arg-count - 2dup car pair-type ensure-arg-type - swap cdr car + 2dup cdr car + 2swap car pair-type ensure-arg-type - 2swap set-car! + set-car! ok-symbol ; make-primitive set-car! :noname ( args -- pair ) 2dup 2 ensure-arg-count - 2dup car pair-type ensure-arg-type - swap cdr car + 2dup cdr car + 2swap car pair-type ensure-arg-type - 2swap set-cdr! + set-cdr! ok-symbol ; make-primitive set-cdr! diff --git a/scheme.4th b/scheme.4th index 9d86461..ae88b4b 100644 --- a/scheme.4th +++ b/scheme.4th @@ -762,6 +762,7 @@ parse-idx-stack parse-idx-sp ! then eof? if + inc-parse-idx bold fg blue ." Moriturus te saluto." reset-term ." ok" cr quit then