1; SketchyLISP Library 2; Copyright (C) 2005,2006,2007 Nils M Holm. All rights reserved. 3; See the file LICENSE of the SketchyLISP distribution 4; for conditions of use. 5 6; ---name--- 7; boolean? 8 9; ---conformance--- 10; R5RS 11 12; ---purpose--- 13; Check whether a datum is a truth value. 14 15; ---args--- 16; X - datum 17 18; ---keywords--- 19; BOOLEAN? function, boolean, truth value, true, false 20; predicate 21 22; ---see-also--- 23; list?, null? 24 25; ---example--- 26; (boolean? #f) => #t 27 28(define booleanp #t) 29 30; ---code--- 31(define (boolean? x) 32 (or (eq? x #t) 33 (eq? x #f))) 34