Plaster

common-lisp
(defun chunks (list n) (check-type n (integer 1)) (loop with left = (length list) for sublist on list by (lambda (x) (nthcdr n x)) collect (subseq sublist 0 (min left n)) do (setf left (max 0 (- left n)))))