fork download
  1. (defun f(l n &optional(p(floor(length l)n))(i 1))(if(= i n)(list l)(cons(subseq l 0 p)(f(subseq l p)n p(+ i 1)))))
  2. (format t "~A~C~C" (f (read) (read)) #\return #\newline)
Success #stdin #stdout 0s 10464KB
stdin
(1 2 3 4 5 6 7)
3
stdout
((1 2) (3 4) (5 6 7))