From b66fe905114c4da70620604f47e57b8d877ed72c Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Tue, 19 Jul 2016 22:27:20 +1200 Subject: [PATCH] First primitive procedure working! --- scheme.4th | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scheme.4th b/scheme.4th index fa53d67..23c7f2b 100644 --- a/scheme.4th +++ b/scheme.4th @@ -278,7 +278,8 @@ global-env setobj ; : add-prim ( args -- ) - nil objeq? if + 2dup nil objeq? if + 2drop 0 number-type else 2dup cdr recurse drop @@ -821,7 +822,7 @@ defer eval : true? ( boolobj -- bool ) false? invert ; -: applicaion? ( obj -- obj bool) +: application? ( obj -- obj bool) pair-type istype? ; : operator ( obj -- operator ) -- 2.20.1