1 ;;;; kclpatch -- Additions to AKCL from CTtL2
3 ;;;; Copyright (c) 1991, by Luke Tierney. Permission is granted for
8 (in-package 'lisp-stat-basics
)
11 ;;;; This file adds some functions from CLtL2 to AKCL. These functions
12 ;;;; were not available in AKCL-1-600 but may become available at a
13 ;;;; later date. I have added them to the LISP-STAT-BASICS package;
14 ;;;; perhaps they ought to be put in the LISP package.
17 (export '(function-lambda-expression realp fixnump
))
19 (defun function-lambda-expression (f)
21 ((and (functionp f
) (consp f
))
24 (values (cons 'lambda
(nthcdr 2 f
)) nil
(second f
)))
26 (values (cons 'lambda
(nthcdr 4 f
))
27 (not (and (null (second f
))
32 (values (cons 'lambda
(nthcdr 5 f
))
33 (not (and (null (second f
))
37 (t (error "unknown function type"))))
38 ((functionp f
) (values nil t nil
))
39 (t (error "not a function - ~s" f
))))
43 Returns T if X is a real number; NIL otherwise."
44 (declare (inline rationalp floatp
))
45 (or (rationalp x
) (floatp x
)))
47 ;;; Many CL's provide a fixnump somewhere. (A)KCL does not, so the one
48 ;;; from ls-basics is exported here.