tisp

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

commit d03fe89a3646355b160a47709f35e20a60a80700
parent f69aa83d8a92f2c77d0696cbf07538c45869bbac
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Mon, 15 Jul 2019 06:00:22 -0700

Add true and false test procedures

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

diff --git a/tibs/lib.tsp b/tibs/lib.tsp @@ -42,6 +42,8 @@ (define (function? x) (= (type x) "function")) (define (pair? x) (= (type x) "pair")) (define (boolean? x) (or (= x t) (nil? x))) +(define (true? x) (or (= x t) (nil? x))) +(define false? nil?) (define (rational? x) (or (integer? x) (ratio? x))) (define (number? x) (or (rational? x) (decimal? x)))