Pad a list in Lisp

Posted by ungraspiness Sun, 21 May 2006 18:48:00 GMT

(defun pad-list (li len ie)
  (append li (make-list (- len (length li)) :initial-element ie)))

Posted in ,  | Tags ,  | no comments

Comments

(leave url/email »)

   Comment Markup Help Preview comment