File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 256
256
257
257
(s/def ::regex regex? )
258
258
(s/def ::compare-fn-token #{:compare-fn })
259
- (s/def ::fn? #( or ( ifn? %) ( ifn? ( eval %))) )
259
+ (s/def ::fn? any? )
260
260
(s/def ::compare-fn (s/cat :compare-fn ::compare-fn-token :fn ::fn? ))
261
261
262
262
(s/def ::or-token #{:or })
Original file line number Diff line number Diff line change 274
274
((p/map-matcher [(:x (:compare-fn even?))] ::even )
275
275
{:x 42 })))))
276
276
277
- ; ; FIXME this should work
278
- ; ; (t/deftest closes-over-outer-variables-test
279
- ; ; (let [evt {:x "x"}]
280
- ; ; (p/map-matcher [(:x (:compare-fn #(= % (:x evt))))] x)))
277
+ (t/deftest closes-over-outer-variables-test
278
+ (let [evt {:x " x" }]
279
+ (t/is (= " x"
280
+ ((p/map-matcher [(:x (:compare-fn #(= % (:x evt))))] x)
281
+ evt)))))
You can’t perform that action at this time.
0 commit comments