在midje中发现了一些奇怪的行为,不确定midje是否与midje有关,或者是由于我对某些clojure结构的误解,但这令人费解:
在事实语句中,不调用for循环:
(ns t1
(:require [midje.sweet :refer :all ] )
)
(facts
(println "ok") ; -- this prints fine
(for [val '(1 2 3)] (println val)) ; this does not
(fact "junk"
(> (.length "aaaaha") 3) => true ))我想,这可能是因为for在ns中被覆盖,但是调用clojure.core/for的行为类似。
https://stackoverflow.com/questions/27410132
复制相似问题