Skip to content

Instantly share code, notes, and snippets.

@maueroats
Created September 14, 2019 12:12
Show Gist options
  • Save maueroats/81107dd8d89108e970b4af3c61891f4b to your computer and use it in GitHub Desktop.
Save maueroats/81107dd8d89108e970b4af3c61891f4b to your computer and use it in GitHub Desktop.
PAIP Ch 02 Starter Code
(declaim (optimize (debug 3)))
(ql:quickload :lisp-unit)
(use-package :lisp-unit)
(defparameter *print-failures* t)
(defun mappend (f xs)
(apply #'append
(mapcar f xs)))
(defun demo (x)
(list x 1))
(define-test test-mappend
"Make sure all is ok"
(assert-equal '(5 1 7 1) (mappend #'demo '(5 7))))
(run-tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment