Changeset 3828
- Timestamp:
- 09/16/03 17:59:41 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/typep.lisp
r3783 r3828 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: typep.lisp,v 1. 4 2003-09-14 17:57:45piso Exp $4 ;;; $Id: typep.lisp,v 1.5 2003-09-16 17:59:41 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 30 30 (and (null displaced-to) (zerop offset))))) 31 31 32 (defun in-interval-p (x interval) 33 (let (low high) 34 (if (endp interval) 35 (setq low '* high '*) 36 (if (endp (cdr interval)) 37 (setq low (car interval) high '*) 38 (setq low (car interval) high (cadr interval)))) 39 (cond ((eq low '*)) 40 ((consp low) 41 (when (<= x (car low)) (return-from in-interval-p nil))) 42 ((when (< x low) (return-from in-interval-p nil)))) 43 (cond ((eq high '*)) 44 ((consp high) 45 (when (>= x (car high)) (return-from in-interval-p nil))) 46 ((when (> x high) (return-from in-interval-p nil)))) 47 (return-from in-interval-p t))) 48 32 49 (defun match-dimensions (dim pat) 33 50 (if (null dim) … … 53 70 (return-from typep t))) 54 71 nil) 72 (INTEGER 73 (and (integerp object) (in-interval-p object i))) 55 74 (SIMPLE-BIT-VECTOR 56 75 (and (simple-bit-vector-p object)
Note: See TracChangeset
for help on using the changeset viewer.