Eliminate spurious redefinition of derivabbrev in Ctensor, fix documentation of diagm...
[maxima/cygwin.git] / src / clmacs.lisp
blob954ad9379e5671605c4566217e3e6d5658cab200
1 ;;; -*- Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 10 -*- ;;;;
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; The data in this file contains enhancments. ;;;;;
4 ;;; ;;;;;
5 ;;; Copyright (c) 1984,1987 by William Schelter,University of Texas ;;;;;
6 ;;; All rights reserved ;;;;;
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9 (in-package :maxima)
11 (defun memq (x lis)
12 (member x lis :test #'eq))
14 ;;this will make operators which declare the type and result of numerical operations
15 (eval-when (:compile-toplevel :load-toplevel)
17 (defmacro def-op (name arg-type op &optional return-type)
18 `(setf (macro-function ',name)
19 (make-operation ',arg-type ',op ',return-type)))
21 ;;make very sure .type .op and .return are not special!!
22 (defun make-operation (.type .op .return)
23 (or .return (setf .return .type))
24 #'(lambda (bod env)
25 (declare (ignore env))
26 (loop for v in (cdr bod)
27 when (eq t .type) collect v into body
28 else
29 collect `(the , .type ,v) into body
30 finally (setq body `(, .op ,@body))
31 (return
32 (if (eq t .return)
33 body
34 `(the , .return ,body))))))
36 ;; these allow running of code and they print out where the error occurred
37 #+fix-debug
38 (progn
39 (defvar *dbreak* t)
41 (defun chk-type (lis na typ sho)
42 (unless (every #'(lambda (v) (typep v typ)) lis)
43 (format t "~%Bad call ~a types:~a" (cons na sho) (mapcar #'type-of lis))
44 (when *dbreak*
45 (break "hi"))))
47 (defmacro def-op (name arg-type old)
48 `(defmacro ,name (&rest l)
49 `(progn
50 (chk-type (list ,@l) ',',name ',',arg-type ',l)
51 (,',old ,@l)))))
53 (def-op f+ fixnum +)
54 (def-op f* fixnum *)
55 (def-op f- fixnum -)
56 (def-op f1- fixnum 1-)
57 (def-op f1+ fixnum 1+)
58 (def-op quotient t quot))
60 ;;this is essentially what the quotient is supposed to do.
62 (declaim (inline quot))
63 (defun quot (a b)
64 (if (and (integerp a) (integerp b))
65 (truncate a b)
66 (/ a b)))
68 (defmacro status (option &optional item)
69 (cond ((equal (symbol-name option) (symbol-name '#:feature))
70 `(member ,(intern (string item) (find-package 'keyword)) *features*))
71 ((equal option 'gctime) 0)))
73 #+(or scl allegro)
74 (defun string<$ (str1 str2)
75 "Compare string, but flip the case for maxima variable names to maintain
76 the same order irrespective of the lisp case mode."
77 (declare (string str1 str2))
78 (cond (#+scl (eq ext:*case-mode* :lower)
79 #+allegro (eq excl:*current-case-mode* :case-sensitive-lower)
80 (let ((str1l (length str1))
81 (str2l (length str2)))
82 (cond ((and (> str1l 1) (char= (aref str1 0) #\$)
83 (> str2l 1) (char= (aref str2 0) #\$))
84 (flet ((case-flip (str)
85 (let ((some-upper nil)
86 (some-lower nil))
87 (dotimes (i (length str))
88 (let ((ch (schar str i)))
89 (when (lower-case-p ch)
90 (setf some-lower t))
91 (when (upper-case-p ch)
92 (setf some-upper t))))
93 (cond ((and some-upper some-lower)
94 nil)
95 (some-upper
96 :downcase)
97 (some-lower
98 :upcase)))))
99 (let ((flip1 (case-flip str1))
100 (flip2 (case-flip str2)))
101 (do ((index 1 (1+ index)))
102 ((or (>= index str1l) (>= index str2l))
103 (if (= index str1l) index nil))
104 (let ((ch1 (aref str1 index))
105 (ch2 (aref str2 index)))
106 (cond ((and (eq flip1 :downcase) (both-case-p ch1))
107 (setf ch1 (char-downcase ch1)))
108 ((and (eq flip1 :upcase) (both-case-p ch1))
109 (setf ch1 (char-upcase ch1))))
110 (cond ((and (eq flip2 :downcase) (both-case-p ch2))
111 (setf ch2 (char-downcase ch2)))
112 ((and (eq flip2 :upcase) (both-case-p ch2))
113 (setf ch2 (char-upcase ch2))))
114 (unless (char= ch1 ch2)
115 (return (if (char< ch1 ch2)
116 index
117 nil))))))))
119 (string< str1 str2)))))
121 (string< str1 str2))))
123 #-(or scl allegro)
124 (defun string<$ (str1 str2)
125 (string< str1 str2))
127 ;;numbers<strings<symbols<lists<?
128 (defun alphalessp (x y)
129 (cond ((numberp x)
130 (if (numberp y) (< x y) t))
131 ((stringp x)
132 (cond ((numberp y) nil)
133 ((stringp y)
134 (string< x y))
135 (t t)))
136 ((symbolp x)
137 (cond ((or (numberp y) (stringp y)) nil)
138 ((symbolp y)
139 (let ((nx (symbol-name x))
140 (ny (symbol-name y)))
141 (declare (string nx ny))
142 (cond ((string<$ nx ny)
144 ((string= nx ny)
145 (cond ((eq nx ny) nil)
146 ((null (symbol-package x)) nil)
147 ((null (symbol-package y)) nil)
148 (t (string<
149 (package-name (symbol-package x))
150 (package-name (symbol-package y))))))
151 (t nil))))
152 ((consp y) t)))
153 ((listp x)
154 (cond ((or (numberp y) (stringp y)(symbolp y )) nil)
155 ((listp y)
156 (or (alphalessp (car x) (car y))
157 (and (equal (car x) (car y))
158 (alphalessp (cdr x) (cdr y)))))
159 (t nil)))
160 ((or (numberp y) (stringp y) (symbolp y)(consp y))
161 nil)
162 (t ;neither is of known type:
163 (alphalessp (format nil "~s" x)(format nil "~s" y)))))
165 (defmacro symbol-array (sym)
166 `(get ,sym 'array))
168 (defun arraydims (ar)
169 (when (symbolp ar)
170 (setq ar (symbol-array ar)))
171 (cons (array-element-type ar) (array-dimensions ar)))
173 (defun firstn (n lis)
174 (subseq lis 0 n))
176 (declaim (inline fixnump))
177 (defun fixnump (n)
178 (typep n 'fixnum))
180 (defun bignump (x)
181 (typep x 'bignum))
183 ;;actually this was for lists too.
185 (defun putprop (sym val indic)
186 (if (consp sym)
187 (setf (getf (cdr sym) indic) val)
188 (setf (get sym indic) val)))
190 (defmacro defprop (sym val indic)
191 (if (eq indic 'expr)
192 `(setf (symbol-function ',sym) #',val)
193 `(setf (get ',sym ',indic) ',val)))
195 ;; Find the N most significant or least significant bits of the
196 ;; absolute value of X. If N is positive, take the most significant;
197 ;; otherwise, the least significant.
198 (defun haipart (x n)
199 (let ((x (abs x)))
200 (if (< n 0)
201 ;; If the desired number of bits is larger than the actual
202 ;; number, just return the number. (Prevents gratuitously
203 ;; generating a huge bignum if n is very large, as can happen
204 ;; with bigfloats.)
205 (if (< (integer-length x) (- n))
207 (logand x (1- (ash 1 (- n)))))
208 (ash x (min (- n (integer-length x)) 0)))))
210 ;; also correct but slower.
211 ;;(defun haipart (integer count)
212 ;; (let ((x (abs integer)))
213 ;; (if (minusp count)
214 ;; (ldb (byte (- count) 0) x)
215 ;; (ldb (byte count (max 0 (- (integer-length x) count))) x))))
217 ;;used in translation
218 (defun fset (sym val)
219 (setf (symbol-function sym) val))
221 (defun oldget (plist indic)
222 (cond ((symbolp plist)
223 (setq plist (symbol-plist plist)))
224 ((consp plist) (setq plist (cdr plist)))
225 (t (return-from oldget nil)))
226 (loop for tail on plist by #'cddr
227 when (eq (car tail) indic)
228 do (return (second tail))))
230 (defun safe-get (sym prop)
231 (and (symbolp sym) (get sym prop)))
233 (defmacro safe-getl (sym prop)
234 `(and (symbolp ,sym) (getl ,sym ,prop)))
236 (defun getl (plist indicator-list )
237 (cond ((symbolp plist)
238 (setq plist (symbol-plist plist)))
239 ((consp plist) (setq plist (cdr plist)))
240 (t (return-from getl nil)))
241 (loop for tail on plist by #'cddr
242 when (member (car tail) indicator-list :test #'eq)
243 do (return tail)))
245 (defmacro ncons (x)
246 `(cons ,x nil)) ;;can one optimize this??
248 (defvar *acursor* (make-array 11 :element-type 'fixnum :initial-element 0))
250 ;; Format of *acursor*.
251 ;; 0 1 2 3 4 5 6 7 8 9 10
252 ;; dim i1 i2 i3 i4 i5 d1 d2 d3 d4 d5
253 ;; array dimension current index maximal index
255 (defun set-up-cursor (ar)
256 (let ((lis (array-dimensions ar)))
257 (setf (aref *acursor* 0) (length lis))
258 (loop for v in lis for i from 6 do (setf (aref *acursor* i) (1- v)))
259 (loop for i from 1 to (length lis) do (setf (aref *acursor* i) 0))))
261 (defun aset-by-cursor (ar val)
262 (let ((curs *acursor*))
263 (declare (type (simple-array fixnum (11)) curs))
264 (ecase (aref curs 0)
265 (1 (setf (aref ar (aref curs 1)) val))
266 (2 (setf (aref ar (aref curs 1) (aref curs 2)) val))
267 (3 (setf (aref ar (aref curs 1) (aref curs 2) (aref curs 3)) val))
268 (4 (setf (aref ar (aref curs 1) (aref curs 2) (aref curs 3)
269 (aref curs 4)) val))
270 (5 (setf (aref ar (aref curs 1) (aref curs 2) (aref curs 3)
271 (aref curs 4) (aref curs 5)) val)))
272 ;; set the index (`cursor') for the next call to ASET-BY-CURSOR
273 (loop for j downfrom (aref curs 0)
274 do (cond ((< (aref curs j) (aref curs (+ 5 j)))
275 (setf (aref curs j) (+ (aref curs j) 1))
276 (return-from aset-by-cursor t))
277 (t (setf (aref curs j) 0)))
278 (cond ((eql j 0) (return-from aset-by-cursor nil))))))
280 (defun fillarray (ar x)
281 (when (symbolp ar)
282 (setq ar (get ar 'array)))
283 (when (/= (array-rank ar) 1)
284 (setq ar (make-array (array-total-size ar) :displaced-to ar)))
285 (setq x (cond ((null x)
286 (ecase (array-element-type ar)
287 (fixnum '(0))
288 (float '(0.0))
289 ((t) '(nil))))
290 ((arrayp x)(listarray x))
291 ((atom x) (list x))
292 (t x)))
293 (when (> (length ar) 0)
294 (set-up-cursor ar)
295 (loop while (aset-by-cursor ar (car x))
296 do (and (cdr x) (setq x (cdr x))))))
298 (defun listarray (x)
299 (when (symbolp x)
300 (setq x (get x 'array)))
301 (if (eql (array-rank x) 1)
302 (coerce x 'list)
303 (coerce (make-array (apply '* (array-dimensions x)) :displaced-to x
304 :element-type (array-element-type x))
305 'list)))
307 (defmacro check-arg (place pred &rest res)
308 (when (atom pred)
309 (setq pred (list pred place)))
310 `(assert ,pred (,place) ,@res))
312 (defmacro deff (fun val)
313 `(setf (symbol-function ',fun) ,val))
315 (defmacro xcons (x y)
316 (cond ((atom x) `(cons ,y,x))
317 (t (let ((g (gensym)))
318 `(let ((,g ,x))
319 (cons ,y ,g))))))
321 (defun make-equal-hash-table (not-dim1)
322 (let ((table (make-hash-table :test 'equal)))
323 (or not-dim1 (setf (gethash 'dim1 table) t))
324 table))
326 ;;; Range of atan should be [0,2*pi]
327 (defun atan (y x)
328 (let ((tem (cl:atan y x)))
329 (if (>= tem 0)
331 (+ tem (* 2 pi)))))
333 ;;; Range of atan2 should be (-pi,pi]
334 ;;; CL manual says that's what lisp::atan is supposed to have.
335 (deff atan2 #'cl:atan)
337 ;;; exp is shadowed to save trouble for other packages--its declared special
338 (deff exp #'cl:exp)
340 #+clisp
341 (progn
342 ;; This used to be enabled, but
343 ;; http://clisp.cons.org/impnotes/num-dict.html seems to indicate
344 ;; that the result of float, coerce, sqrt, etc., on a rational will
345 ;; return a float of the specified type. But ANSI CL says we must
346 ;; return a single-float. I (rtoy) am commenting this out for now.
348 ;; (setq custom:*default-float-format* 'double-float)
350 ;; We currently don't want any warnings about floating-point contagion.
351 (setq custom::*warn-on-floating-point-contagion* nil)
353 ;; We definitely want ANSI-style floating-point contagion.
354 (setq custom:*floating-point-contagion-ansi* t)
356 ;; Set custom:*floating-point-rational-contagion-ansi* so that
357 ;; contagion is done as per the ANSI CL standard. Has an effect only
358 ;; in those few cases when the mathematical result is exact although
359 ;; one of the arguments is a floating-point number, such as (* 0
360 ;; 1.618), (/ 0 1.618), (atan 0 1.0), (expt 2.0 0)
361 (setq custom:*floating-point-rational-contagion-ansi* t)
363 ;; When building maxima using with 'flonum being a 'long-float it may be
364 ;; useful to adjust the number of bits of precision that CLISP uses for
365 ;; long-floats.
366 #+nil
367 (setf (ext:long-float-digits) 128)
369 ;; We want underflows not to signal errors.
370 (ext:without-package-lock ()
371 (setq sys::*inhibit-floating-point-underflow* t))
374 #+abcl
375 (progn
376 ;; We want underflows not to signal errors
377 (when (fboundp (find-symbol "FLOAT-UNDERFLOW-MODE" "SYS"))
378 (funcall (find-symbol "FLOAT-UNDERFLOW-MODE" "SYS") nil))
381 ;; Make the maximum exponent larger for CMUCL. Without this, cmucl
382 ;; will generate a continuable error when raising an integer to a
383 ;; power greater than this.
384 #+cmu
385 (setf ext::*intexp-maximum-exponent* 100000)
386 ;;;; Setup the mapping from the Maxima 'flonum float type to a CL float type.
387 ;;;;
388 ;;;; Add :flonum-long to *features* if you want flonum to be a
389 ;;;; long-float. Or add :flonum-double-double if you want flonum to
390 ;;;; be a double-double (currently only for CMUCL). Otherwise, you
391 ;;;; get double-float as the flonum type.
392 ;;;;
393 ;;;; Default double-float flonum.
394 (eval-when (:compile-toplevel :load-toplevel :execute)
395 (setq *read-default-float-format* 'double-float))
397 #-(or flonum-long flonum-double-double)
398 (progn
399 ;; Tell Lisp the float type for a 'flonum.
400 #-clisp
401 (deftype flonum (&optional low high)
402 (cond (high
403 `(double-float ,low ,high))
404 (low
405 `(double-float ,low))
407 'double-float)))
409 ;; Some versions of clisp appear to be buggy: (coerce 1 'flonum)
410 ;; signals an error. So does (coerce 1 '(double-float 0d0)). But
411 ;; (coerce 1 'double-float) returns 1d0 as expected. So for now, make
412 ;; flonum be exactly the same as double-float, without bounds.
413 #+clisp
414 (deftype flonum (&optional low high)
415 (declare (ignorable low high))
416 'double-float)
418 (defconstant most-positive-flonum most-positive-double-float)
419 (defconstant most-negative-flonum most-negative-double-float)
420 (defconstant least-positive-flonum least-positive-double-float)
421 (defconstant least-negative-flonum least-negative-double-float)
422 (defconstant flonum-epsilon double-float-epsilon)
423 (defconstant least-positive-normalized-flonum least-positive-normalized-double-float)
425 (defconstant flonum-exponent-marker #\D)
428 #+flonum-long
429 (progn
430 ;;;; The Maxima 'flonum can be a CL 'long-float on the Scieneer CL or CLISP,
431 ;;;; but should be the same as 'double-float on other CL implementations.
433 (eval-when (:compile-toplevel :load-toplevel :execute)
434 (setq *read-default-float-format* 'long-float))
436 ;; Tell Lisp the float type for a 'flonum.
437 (deftype flonum (&optional low high)
438 (cond (high
439 `(long-float ,low ,high))
440 (low
441 `(long-float ,low))
443 'long-float)))
445 (defconstant most-positive-flonum most-positive-long-float)
446 (defconstant most-negative-flonum most-negative-long-float)
447 (defconstant least-positive-flonum least-positive-long-float)
448 (defconstant least-negative-flonum least-negative-long-float)
449 (defconstant flonum-epsilon long-float-epsilon)
450 (defconstant least-positive-normalized-flonum least-positive-normalized-long-float)
452 (defconstant flonum-exponent-marker #\L)
456 #+flonum-double-double
457 (progn
459 ;;;; The Maxima 'flonum can be a 'kernel:double-double-float on the CMU CL.
461 (eval-when (:compile-toplevel :load-toplevel :execute)
462 (setq *read-default-float-format* 'kernel:double-double-float))
464 ;; Tell Lisp the float type for a 'flonum.
465 (deftype flonum (&optional low high)
466 (cond (high
467 `(kernel:double-double-float ,low ,high))
468 (low
469 `(kernel:double-double-float ,low))
471 'kernel:double-double-float)))
473 ;; While double-double can represent number as up to
474 ;; most-positive-double-float, it can't really do operations on them
475 ;; due to the way multiplication and division are implemented. (I
476 ;; don't think there's any workaround for that.)
478 ;; So, the largest number that can be used is the float just less than
479 ;; 2^1024/(1+2^27). This is the number given here.
480 (defconstant most-positive-double-double-hi
481 (scale-float (cl:float (1- 9007199187632128) 1d0) 944))
483 (defconstant most-positive-flonum (cl:float most-positive-double-double-hi 1w0))
484 (defconstant most-negative-flonum (cl:float (- most-positive-double-double-hi 1w0)))
485 (defconstant least-positive-flonum (cl:float least-positive-double-float 1w0))
486 (defconstant least-negative-flonum (cl:float least-negative-double-float 1w0))
487 ;; This is an approximation to a double-double epsilon. Due to the
488 ;; way double-doubles are represented, epsilon is actually zero
489 ;; because 1+x = 1 only when x is zero. But double-doubles only have
490 ;; 106 bits of precision, so we use that as epsilon.
491 (defconstant flonum-epsilon (scale-float 1w0 -106))
492 (defconstant least-positive-normalized-flonum (cl:float least-positive-normalized-double-float 1w0))
494 (defconstant flonum-exponent-marker #\W)
498 ;;;;
499 (defmacro float (x &optional (y 1e0))
500 `(cl:float ,x ,y))
502 (defmacro with-collector (collector-sym &body forms)
503 (let ((acc (gensym)))
504 `(let ((,acc))
505 (flet ((,collector-sym (x) (push x ,acc)))
506 ,@forms
507 (nreverse ,acc)))))
509 ;; DO-MERGE-ASYM moved here from nset.lisp so that it is defined before
510 ;; it is referenced in compar.lisp.
511 (defmacro do-merge-symm (list1 list2 eqfun lessfun bothfun onefun)
512 ;; Like do-merge-asym, but calls onefun if an element appears in one but
513 ;; not the other list, regardless of which list it appears in.
514 `(do-merge-asym ,list1 ,list2 ,eqfun ,lessfun ,bothfun ,onefun ,onefun))
516 (defmacro do-merge-asym
517 (list1 list2 eqfun lessfun bothfun only1fun only2fun)
518 ;; Takes two lists.
519 ;; The element equality function is eqfun, and they must be sorted by lessfun.
520 ;; Calls bothfun on each element that is shared by the two lists;
521 ;; calls only1fun on each element that appears only in the first list;
522 ;; calls only2fun on each element that appears only in the second list.
523 ;; If both/only1/only2 fun are nil, treat as no-op.
524 (let ((l1var (gensym))
525 (l2var (gensym)))
526 `(do ((,l1var ,list1)
527 (,l2var ,list2))
528 ((cond ((null ,l1var)
529 (if ,only2fun
530 (while ,l2var
531 (funcall ,only2fun (car ,l2var))
532 (setq ,l2var (cdr ,l2var))))
534 ((null ,l2var)
535 (if ,only1fun
536 (while ,l1var
537 (funcall ,only1fun (car ,l1var))
538 (setq ,l1var (cdr ,l1var))))
540 ((funcall ,eqfun (car ,l1var) (car ,l2var))
541 (if ,bothfun (funcall ,bothfun (car ,l1var)))
542 (setq ,l1var (cdr ,l1var) ,l2var (cdr ,l2var))
543 nil)
544 ((funcall ,lessfun (car ,l1var) (car ,l2var))
545 (if ,only1fun (funcall ,only1fun (car ,l1var)))
546 (setq ,l1var (cdr ,l1var))
547 nil)
549 (if ,only2fun (funcall ,only2fun (car ,l2var)))
550 (setq ,l2var (cdr ,l2var))
551 nil))))))
553 ;;; Test
554 ; (do-merge-asym '(a a a b c g h k l)
555 ; '(a b b c c h i j k k)
556 ; 'eq
557 ; 'string<
558 ; '(lambda (x) (prin0 'both x))
559 ; '(lambda (x) (prin0 'one1 x))
560 ; '(lambda (x) (prin0 'one2 x)))
561 ; both a
562 ; one1 a
563 ; one1 a
564 ; both b
565 ; one2 b
566 ; both c
567 ; one2 c
568 ; one1 g
569 ; both h
570 ; one2 i
571 ; one2 j
572 ; both k
573 ; one2 k
574 ; one1 l
575 ; nil
577 ;; Defines a function named NAME that checks that the number of
578 ;; arguments is correct. If the number of actual arguments is
579 ;; incorrect, a maxima error is signaled.
581 ;; The required arguments is given by REQUIRED-ARG-LIST. Allowed
582 ;; (maxima) keyword arguments is given by KEYWORD-ARG-LIST.
584 ;; The body of the function can refer to KEYLIST which is the list of
585 ;; maxima keyword arguments converted to lisp keyword arguments.
587 (defmacro defun-checked (name ((&rest required-arg-list)
588 &rest keyword-arg-list)
589 &body body)
590 (let ((number-of-required-args (length required-arg-list))
591 (number-of-keyword-args (length keyword-arg-list))
592 (arg-list (gensym "ARG-LIST-"))
593 (helper-fun (gensym "REAL-FUN-"))
594 (options (gensym "OPTIONS-ARG-")))
595 `(defun ,name (&rest ,arg-list)
596 ;; Check that the required number of arguments is given and
597 ;; that we don't supply too many arguments.
599 ;; NOTE: The check when keyword args are given is a little too
600 ;; tight. It's valid to have duplicate keyword args, but we
601 ;; disallow that if the number of arguments exceed the limit.
602 (when (or (> (length ,arg-list) ,(+ number-of-required-args number-of-keyword-args))
603 (< (length ,arg-list) ,number-of-required-args))
604 (merror (intl:gettext "~M arguments supplied to ~M: found ~M")
605 (if (< (length ,arg-list) ,number-of-required-args)
606 (intl:gettext "Too few")
607 (if (> (length ,arg-list) ,(+ number-of-required-args
608 number-of-keyword-args))
609 (intl:gettext "Too many")
610 (intl:gettext "Incorrect number of")))
611 ',(if keyword-arg-list
612 `((,name) ,@required-arg-list ((mlist simp) ,@keyword-arg-list))
613 `((,name) ,@required-arg-list))
614 (cons '(mlist) ,arg-list)))
615 (flet ((,helper-fun (,@required-arg-list
616 ,@(when keyword-arg-list
617 `(&rest ,options)))
618 (let ,(when keyword-arg-list
619 `((keylist (lispify-maxima-keyword-options ,options
620 ',keyword-arg-list))))
621 ,@body)))
622 (apply #',helper-fun ,arg-list)))))