From: Tim Vaughan Date: Tue, 19 Jul 2016 10:07:32 +0000 (+1200) Subject: Completed draft of primitive application. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scheme.forth.jl.git;a=commitdiff_plain;h=8772ce0cfd9d1140df94efcad344deb931101f42 Completed draft of primitive application. --- diff --git a/scheme.4th b/scheme.4th index 5c8f57d..fa53d67 100644 --- a/scheme.4th +++ b/scheme.4th @@ -831,7 +831,7 @@ defer eval cdr ; : nooperands? ( operands -- bool ) - cdr nil objeq? ; + nil objeq? ; : first-operand ( operands -- operand ) car ; @@ -840,7 +840,15 @@ defer eval cdr ; : list-of-vals ( args env -- vals ) + 2swap + 2dup nooperands? if + 2swap 2drop + else + 2over 2over first-operand 2swap eval + -2rot rest-operands 2swap recurse + cons + then ; :noname ( obj env -- result )