1
0
mirror of synced 2026-02-11 19:04:55 +00:00
Files
Interlisp.medley/internal/test/LANGUAGE/AUTO/EVENP.TEST

37 lines
747 B
Plaintext

;; Function To Be Tested: EVENP
;;
;; Source: Guy L Steele's CLTL
;; Section: 12.2 Predicates on Numbers
;; Page: 196
;;
;; Created By: Kelly Roach
;;
;; Creation Date: July 12,1986
;;
;; Last Update: July 12,1986
;;
;; Filed As: {ERIS}<LISPCORE>CML>TEST>12-2-EVENP.TEST
;;
;;
;; Syntax: (EVENP NUMBER &OPTIONAL MODULUS)
;;
;; Function Description:
;; This predicate is true if the argument INTEGER is even (divisible
;; by two), and otherwise is false. It is an error if the argument is not
;; an integer.
;;
;; Argument(s): NUMBER - a number
;; MODULUS - an integer
;;
;; Returns: T or NIL
;;
(do-test evenp-test
(and (evenp 2)
(evenp -4)
(not (evenp 3))))
STOP