comparison lisp/cl-extra.el @ 1983:9c872f33ecbe

[xemacs-hg @ 2004-04-05 22:49:31 by james] Add bignum, ratio, and bigfloat support.
author james
date Mon, 05 Apr 2004 22:50:11 +0000
parents 175ee2cb4d3a
children 393039450288
comparison
equal deleted inserted replaced
1982:a748951fd4fb 1983:9c872f33ecbe
78 ((and (eq type 'character) (stringp x) (= (length x) 1)) (aref x 0)) 78 ((and (eq type 'character) (stringp x) (= (length x) 1)) (aref x 0))
79 ((and (eq type 'character) (symbolp x)) (coerce (symbol-name x) type)) 79 ((and (eq type 'character) (symbolp x)) (coerce (symbol-name x) type))
80 ((and (eq type 'character) (char-int-p x)) (int-char x)) 80 ((and (eq type 'character) (char-int-p x)) (int-char x))
81 ((and (eq type 'integer) (characterp x)) (char-int x)) 81 ((and (eq type 'integer) (characterp x)) (char-int x))
82 ((eq type 'float) (float x)) 82 ((eq type 'float) (float x))
83 ((and (featurep 'number-types)
84 (memq type '(integer ratio bigfloat))
85 (coerce-number x type)))
83 ((eq type 'bit-vector) (if (bit-vector-p x) x 86 ((eq type 'bit-vector) (if (bit-vector-p x) x
84 (apply 'bit-vector (append x nil)))) 87 (apply 'bit-vector (append x nil))))
85 ((eq type 'weak-list) 88 ((eq type 'weak-list)
86 (if (weak-list-p x) x 89 (if (weak-list-p x) x
87 (let ((wl (make-weak-list))) 90 (let ((wl (make-weak-list)))