Add compatibility with babashka
This commit is contained in:
parent
62375212a8
commit
283cb13e58
2 changed files with 5 additions and 3 deletions
|
|
@ -99,7 +99,8 @@
|
|||
(not (arities 2)) (conj (let [[[acc karg varg] & body] (arities 3)]
|
||||
`([~acc [~karg ~varg]] ~@body))))]
|
||||
`(reify
|
||||
~@(macros/case :clj '[clojure.lang.Fn])
|
||||
#?@(:bb [] ;; babashka currently only supports reify with one Java interface at a time
|
||||
:default [~@(macros/case :clj '[clojure.lang.Fn])])
|
||||
KvRfable
|
||||
(some-kvrf [this#] this#)
|
||||
~(macros/case :cljs `core/IFn :clj 'clojure.lang.IFn)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@
|
|||
(is (= {0 :ok 2 :ok 4 :ok 6 :ok 8 :ok} (x/without (zipmap (range 10) (repeat :ok)) (filter odd?) (range 20))))
|
||||
(is (= #{0 2 4 6 8 } (x/without (set (range 10)) (filter odd?) (range 20)))))
|
||||
|
||||
#?(:clj
|
||||
#?(:bb nil ;; babashka doesn't currently support calling iterator on range type
|
||||
:clj
|
||||
(deftest iterator
|
||||
(is (true? (.hasNext (x/iterator x/count (.iterator (range 5))))))
|
||||
(is (is (= [5] (iterator-seq (x/iterator x/count (.iterator (range 5)))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue