yeah
This commit is contained in:
parent
61fda073b2
commit
b569b6fae2
2 changed files with 16 additions and 1 deletions
|
|
@ -17,5 +17,15 @@
|
|||
"interfaces": [
|
||||
"java.nio.file.DirectoryStream$Filter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"interfaces": [
|
||||
"java.util.function.Supplier"
|
||||
]
|
||||
},
|
||||
{
|
||||
"interfaces": [
|
||||
"java.util.function.UnaryOperator"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -69,4 +69,9 @@
|
|||
(is (true? (bb nil "(= [1 3] (into [] (doto (java.util.ArrayList. [1 2 3]) (.removeIf even?))))")))
|
||||
(is (true? (bb nil "(= \"abcabc\" (.computeIfAbsent (java.util.HashMap.) \"abc\" #(str % %)))")))
|
||||
(is (true? (bb nil "(= '(\\9) (-> \"a9-\" seq .stream (.filter Character/isDigit) stream-seq!))")))
|
||||
)
|
||||
(is (true? (bb nil "(require (quote [clojure.java.io :as jio])) (import [java.io File] [java.nio.file Path Files DirectoryStream$Filter]) (pos? (count (seq (Files/newDirectoryStream (.toPath (jio/file \".\"))
|
||||
#(-> ^Path % .toFile .isDirectory)))))")))
|
||||
(is (true? (bb nil "(import [java.util Collection] [java.util.stream Stream] [java.util.function Predicate])
|
||||
(= '(100 100 100 100 100) (->> (Stream/generate (constantly 100)) stream-seq! (take 5)))")))
|
||||
(is (true? (bb nil "(import [java.util Collection] [java.util.stream Stream] [java.util.function Predicate])
|
||||
(= '(1 2 3 4 5 6 7 8 9 10) (->> (Stream/iterate 1 inc) stream-seq! (take 10)))"))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue