tasks a-s

This commit is contained in:
Ingy döt Net 2013-04-10 23:57:08 -07:00
parent 47bf37c096
commit b83f433714
12433 changed files with 156208 additions and 123 deletions

View file

@ -0,0 +1,12 @@
(defun fs (f s) (mapcar f s))
(defun f1 (i) (* i 2))
(defun f2 (i) (expt i 2))
(defun partial (func &rest args1)
(lambda (&rest args2) (apply func (append args1 args2))))
(defvar fsf1 (partial #'fs #'f1))
(defvar fsf2 (partial #'fs #'f2))
(dolist (seq '((0 1 2 3) (2 4 6 8)))
(format t "~%seq: ~A~% fsf1 seq: ~A~% fsf2 seq: ~A"
seq (funcall fsf1 seq) (funcall fsf2 seq)))