Plaster

common-lisp
(defun partition (source n) (let* ((length (length source)) (end (- length (rem length n))) sink) (do ((i 0 (1+ i))) ((= i end)) (if (= (rem i n) 0) (push (subseq source i (+ i n)) sink))) (unless (= end length) (push (subseq source end length) sink)) (nreverse sink)))