Created
February 7, 2017 00:00
-
-
Save ayato-p/b14ec533e7e25797b3553a040e7af99c to your computer and use it in GitHub Desktop.
嘘吐き!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns liar) | |
(defn with-liar* [exp] | |
(map (fn [sym] | |
(case sym | |
true 'false | |
false 'true | |
sym)) | |
exp)) | |
(require '[clojure.test :refer [is]]) | |
(defmacro with-liar [& body] | |
(let [body# (map with-liar* body)] | |
`(do ~@body#))) | |
(with-liar (is true)) | |
;; FAIL in () (form-init1497587791262311540.clj:17) | |
;; expected: false | |
;; actual: false | |
;; false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment