master
Ringo Wantanabe 6 years ago
parent 20dcd429ea
commit 92046b7133
No known key found for this signature in database
GPG Key ID: DDDD9B6759158726

@ -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) #\()

Loading…
Cancel
Save