tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 432903f87525fa4c2428917cf6564ab428b300b7
parent 4fab7d1bbbd3c5056e9f41333218372271a72fa3
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Mon, 16 Dec 2019 01:56:36 -0800

Add true and false keywords

Diffstat:
tibs/lib.tsp | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tibs/lib.tsp b/tibs/lib.tsp @@ -78,6 +78,8 @@ (map cadr vars))) ;;; Logic +(define true t) +(define false ()) (define (not x) (if x nil t)) ; TODO logic func many arguments @@ -92,14 +94,12 @@ (list 'not (list 'or a b))) ;;; Lists -(define first car) -(define rest cdr) (define (list* . lst) (if (cdr lst) (cons (car lst) (apply list* (cdr lst))) (car lst))) -(define (do . body) (last body)) +(define (do . body) (last body)) (define (do0 . body) (car body)) (define (length lst)