|
|
|
@ -411,6 +411,19 @@
|
|
|
|
|
|
|
|
|
|
(defun val (v) v)
|
|
|
|
|
|
|
|
|
|
(defun groupn (n list)
|
|
|
|
|
(let ((last nil)
|
|
|
|
|
(ret nil))
|
|
|
|
|
(loop for x in list
|
|
|
|
|
for y from 0 below (length list)
|
|
|
|
|
do (if (= 0 (mod y n))
|
|
|
|
|
(push x last)
|
|
|
|
|
(progn
|
|
|
|
|
(push x last)
|
|
|
|
|
(setf ret (cons (reverse last) ret))
|
|
|
|
|
(setf last nil))))
|
|
|
|
|
(reverse ret)))
|
|
|
|
|
|
|
|
|
|
(defun sexpr-reader (stream char &key (func 'val))
|
|
|
|
|
"Read next token only if S expression, else return as is"
|
|
|
|
|
(if (char= (peek-char t stream t nil t) #\()
|
|
|
|
|