From 4c0c4603cd212e368b198821e54991133e5c3c1f Mon Sep 17 00:00:00 2001
From: Roman Bataev
Date: Thu, 13 Oct 2022 09:14:13 -0400
Subject: [PATCH 1/5] Fix release.joke
---
release.joke | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/release.joke b/release.joke
index 477b3abc9..413704908 100644
--- a/release.joke
+++ b/release.joke
@@ -35,8 +35,8 @@
formula-file (get (os/env) "JOKER_FORMULA_PATH")
formula (slurp formula-file)
[_ current-version] (re-find (re-pattern version-pattern) formula)
- linux-sha (shasum (str "joker-" version' "-linux-amd64.zip"))
- mac-sha (shasum (str "joker-" version' "-mac-amd64.zip"))
+ linux-sha (shasum "joker-linux-amd64.zip")
+ mac-sha (shasum "joker-mac-amd64.zip")
shasum-rex (re-pattern shasum-pattern)]
(when-not current-version
(exit-err "Could not find version number"))
From 77303029e8e8e57391a29d57f73b10e829f7ca08 Mon Sep 17 00:00:00 2001
From: Roman Bataev
Date: Thu, 13 Oct 2022 09:14:55 -0400
Subject: [PATCH 2/5] Fix bound-fn linting.
---
core/data/linter_clj.joke | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/core/data/linter_clj.joke b/core/data/linter_clj.joke
index 612c5830e..dcdf624ba 100644
--- a/core/data/linter_clj.joke
+++ b/core/data/linter_clj.joke
@@ -307,7 +307,6 @@
(defn gen-class [& options])
(defn with-loading-context [& body])
-(defn bound-fn [& fntail])
(defn future [& body])
(defn pvalues [& exprs])
(defn with-precision [precision & exprs])
@@ -322,6 +321,10 @@
(defn proxy-super [meth & args])
(defn with-open [bindings & body])
+(defmacro bound-fn
+ [& fntail]
+ `(fn ~@fntail))
+
(defmacro proxy
[class-and-interfaces args & fs]
(when-not (vector? class-and-interfaces)
From 05c2706dfa4cd6857a69049fde96d6dd1e8dbe51 Mon Sep 17 00:00:00 2001
From: Roman Bataev
Date: Tue, 25 Oct 2022 10:35:48 -0400
Subject: [PATCH 3/5] v1.0.2
---
core/procs.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/procs.go b/core/procs.go
index 94af5e245..b117d090a 100644
--- a/core/procs.go
+++ b/core/procs.go
@@ -38,7 +38,7 @@ const (
PRINT_IF_NOT_NIL
)
-const VERSION = "v1.0.1"
+const VERSION = "v1.0.2"
const (
CLJ Dialect = iota
From c6b77711b671579f8b028646d41ee03b8a496b9a Mon Sep 17 00:00:00 2001
From: Roman Bataev
Date: Tue, 8 Nov 2022 22:13:47 -0500
Subject: [PATCH 4/5] Add update-keys and update-vals functions.
Also adds function signatures for new functions in Clojure v1.11 (for
linting).
---
core/data/core.joke | 652 ++++++++++++++++++++------------------
core/data/linter_clj.joke | 14 +-
2 files changed, 350 insertions(+), 316 deletions(-)
diff --git a/core/data/core.joke b/core/data/core.joke
index f4937f80c..8d0de34a4 100644
--- a/core/data/core.joke
+++ b/core/data/core.joke
@@ -71,9 +71,9 @@
; TODO: types
conj (fn conj (^Collection [coll x] (conj__ coll x))
(^Collection [coll x & xs]
- (if xs
- (recur (conj__ coll x) (first xs) (next xs))
- (conj__ coll x)))))
+ (if xs
+ (recur (conj__ coll x) (first xs) (next xs))
+ (conj__ coll x)))))
(def ^{:doc "Same as (first (next x))"
:arglists '([x])
@@ -156,12 +156,12 @@
assoc
(fn assoc (^Map [^Associative map key val] (assoc__ map key val))
(^Map [^Associative map key val & kvs]
- (let [ret (assoc__ map key val)]
- (if kvs
- (if (next kvs)
- (recur ret (first kvs) (second kvs) (nnext kvs))
- (throw (ex-info "assoc expects even number of arguments after map/vector, found odd number" {})))
- ret)))))
+ (let [ret (assoc__ map key val)]
+ (if kvs
+ (if (next kvs)
+ (recur ret (first kvs) (second kvs) (nnext kvs))
+ (throw (ex-info "assoc expects even number of arguments after map/vector, found odd number" {})))
+ ret)))))
(def ^{:arglists '([obj])
:doc "Returns the metadata of obj, returns nil if there is no metadata."
@@ -457,8 +457,8 @@
:added "1.0"}
;; TODO: types
(^Keyword [name] (cond (keyword? name) name
- (symbol? name) (keyword__ name)
- (string? name) (keyword__ name)))
+ (symbol? name) (keyword__ name)
+ (string? name) (keyword__ name)))
(^Keyword [ns name] (keyword__ ns name)))
(defn spread
@@ -478,7 +478,7 @@
(^Seq [a b ^Seqable args] (cons a (cons b args)))
(^Seq [a b c ^Seqable args] (cons a (cons b (cons c args))))
(^Seq [a b c d & more]
- (cons a (cons b (cons c (cons d (spread more)))))))
+ (cons a (cons b (cons c (cons d (spread more)))))))
(defn apply
"Applies fn f to the argument list formed by prepending intervening arguments to args."
@@ -522,20 +522,20 @@
(^Seq [] (lazy-seq nil))
(^Seq [^Seqable x] (lazy-seq x))
(^Seq [^Seqable x ^Seqable y]
- (lazy-seq
- (let [s (seq x)]
- (if s
- (cons (first s) (concat (rest s) y))
- y))))
+ (lazy-seq
+ (let [s (seq x)]
+ (if s
+ (cons (first s) (concat (rest s) y))
+ y))))
(^Seq [^Seqable x ^Seqable y & zs]
- (let [cat (fn cat [xys zs]
- (lazy-seq
- (let [xys (seq xys)]
- (if xys
- (cons (first xys) (cat (rest xys) zs))
- (when zs
- (cat (first zs) (next zs)))))))]
- (cat (concat x y) zs))))
+ (let [cat (fn cat [xys zs]
+ (lazy-seq
+ (let [xys (seq xys)]
+ (if xys
+ (cons (first xys) (cat (rest xys) zs))
+ (when zs
+ (cat (first zs) (next zs)))))))]
+ (cat (concat x y) zs))))
(defmacro delay
@@ -582,11 +582,11 @@
(^Boolean [x] true)
(^Boolean [x y] (=__ x y))
(^Boolean [x y & more]
- (if (=__ x y)
- (if (next more)
- (recur y (first more) (next more))
- (=__ y (first more)))
- false)))
+ (if (=__ x y)
+ (if (next more)
+ (recur y (first more) (next more))
+ (=__ y (first more)))
+ false)))
(defn not=
"Same as (not (= obj1 obj2))"
@@ -594,7 +594,7 @@
(^Boolean [x] false)
(^Boolean [x y] (not (= x y)))
(^Boolean [x y & more]
- (not (apply = x y more))))
+ (not (apply = x y more))))
(defn compare
"Comparator. Returns a negative number, zero, or a positive number
@@ -662,11 +662,11 @@
(^Boolean [^Number x] true)
(^Boolean [^Number x ^Number y] (<__ x y))
(^Boolean [^Number x ^Number y & more]
- (if (< x y)
- (if (next more)
- (recur y (first more) (next more))
- (< y (first more)))
- false)))
+ (if (< x y)
+ (if (next more)
+ (recur y (first more) (next more))
+ (< y (first more)))
+ false)))
(defn inc'
"Returns a number one greater than num. Supports arbitrary precision.
@@ -716,7 +716,7 @@
(^Number [^Number x] (cast Number x))
(^Number [^Number x ^Number y] (add'__ x y))
(^Number [^Number x ^Number y & more]
- (reduce +' (+' x y) more)))
+ (reduce +' (+' x y) more)))
(defn +
"Returns the sum of nums. (+) returns 0. Does not auto-promote
@@ -726,7 +726,7 @@
(^Number [^Number x] (cast Number x))
(^Number [^Number x ^Number y] (add__ x y))
(^Number [^Number x ^Number y & more]
- (reduce + (+ x y) more)))
+ (reduce + (+ x y) more)))
(defn *'
"Returns the product of nums. (*) returns 1. Supports arbitrary precision.
@@ -736,7 +736,7 @@
(^Number [^Number x] (cast Number x))
(^Number [^Number x ^Number y] (multiply'__ x y))
(^Number [^Number x ^Number y & more]
- (reduce *' (*' x y) more)))
+ (reduce *' (*' x y) more)))
(defn *
"Returns the product of nums. (*) returns 1. Does not auto-promote
@@ -746,7 +746,7 @@
(^Number [^Number x] (cast Number x))
(^Number [^Number x ^Number y] (multiply__ x y))
(^Number [^Number x ^Number y & more]
- (reduce * (* x y) more)))
+ (reduce * (* x y) more)))
(defn /
"If no denominators are supplied, returns 1/numerator,
@@ -755,7 +755,7 @@
(^Number [^Number x] (/ 1 x))
(^Number [^Number x ^Number y] (divide__ x y))
(^Number [^Number x ^Number y & more]
- (reduce / (/ x y) more)))
+ (reduce / (/ x y) more)))
(defn -'
"If no ys are supplied, returns the negation of x, else subtracts
@@ -765,7 +765,7 @@
(^Number [^Number x] (subtract'__ x))
(^Number [^Number x ^Number y] (subtract'__ x y))
(^Number [^Number x ^Number y & more]
- (reduce -' (-' x y) more)))
+ (reduce -' (-' x y) more)))
(defn -
"If no ys are supplied, returns the negation of x, else subtracts
@@ -775,7 +775,7 @@
(^Number [^Number x] (subtract__ x))
(^Number [^Number x ^Number y] (subtract__ x y))
(^Number [^Number x ^Number y & more]
- (reduce - (- x y) more)))
+ (reduce - (- x y) more)))
(defn <=
"Returns non-nil if nums are in monotonically non-decreasing order,
@@ -784,11 +784,11 @@
(^Boolean [^Number x] true)
(^Boolean [^Number x ^Number y] (<=__ x y))
(^Boolean [^Number x ^Number y & more]
- (if (<= x y)
- (if (next more)
- (recur y (first more) (next more))
- (<= y (first more)))
- false)))
+ (if (<= x y)
+ (if (next more)
+ (recur y (first more) (next more))
+ (<= y (first more)))
+ false)))
(defn >
"Returns non-nil if nums are in monotonically decreasing order,
@@ -797,11 +797,11 @@
(^Boolean [^Number x] true)
(^Boolean [^Number x ^Number y] (>__ x y))
(^Boolean [^Number x ^Number y & more]
- (if (> x y)
- (if (next more)
- (recur y (first more) (next more))
- (> y (first more)))
- false)))
+ (if (> x y)
+ (if (next more)
+ (recur y (first more) (next more))
+ (> y (first more)))
+ false)))
(defn >=
"Returns non-nil if nums are in monotonically non-increasing order,
@@ -810,11 +810,11 @@
(^Boolean [^Number x] true)
(^Boolean [^Number x ^Number y] (>=__ x y))
(^Boolean [^Number x ^Number y & more]
- (if (>= x y)
- (if (next more)
- (recur y (first more) (next more))
- (>= y (first more)))
- false)))
+ (if (>= x y)
+ (if (next more)
+ (recur y (first more) (next more))
+ (>= y (first more)))
+ false)))
(defn ==
"Returns non-nil if nums all have the equivalent
@@ -823,11 +823,11 @@
(^Boolean [^Number x] true)
(^Boolean [^Number x ^Number y] (==__ x y))
(^Boolean [^Number x ^Number y & more]
- (if (== x y)
- (if (next more)
- (recur y (first more) (next more))
- (== y (first more)))
- false)))
+ (if (== x y)
+ (if (next more)
+ (recur y (first more) (next more))
+ (== y (first more)))
+ false)))
(defn max
"Returns the greatest of the nums."
@@ -835,7 +835,7 @@
(^Number [^Number x] x)
(^Number [^Number x ^Number y] (max__ x y))
(^Number [^Number x ^Number y & more]
- (reduce max (max x y) more)))
+ (reduce max (max x y) more)))
(defn min
"Returns the least of the nums."
@@ -843,7 +843,7 @@
(^Number [^Number x] x)
(^Number [^Number x ^Number y] (min__ x y))
(^Number [^Number x ^Number y & more]
- (reduce min (min x y) more)))
+ (reduce min (min x y) more)))
(defn dec'
"Returns a number one less than num. Supports arbitrary precision.
@@ -889,28 +889,28 @@
{:added "1.0"}
(^Int [^Int x ^Int y] (bit-and__ x y))
(^Int [^Int x ^Int y & more]
- (reduce bit-and (bit-and x y) more)))
+ (reduce bit-and (bit-and x y) more)))
(defn bit-or
"Bitwise or"
{:added "1.0"}
(^Int [^Int x ^Int y] (bit-or__ x y))
(^Int [^Int x ^Int y & more]
- (reduce bit-or (bit-or x y) more)))
+ (reduce bit-or (bit-or x y) more)))
(defn bit-xor
"Bitwise exclusive or"
{:added "1.0"}
(^Int [^Int x ^Int y] (bit-xor_ x y))
(^Int [^Int x ^Int y & more]
- (reduce bit-xor (bit-xor x y) more)))
+ (reduce bit-xor (bit-xor x y) more)))
(defn bit-and-not
"Bitwise and with complement"
{:added "1.0"}
(^Int [^Int x ^Int y] (bit-and-not__ x y))
(^Int [^Int x ^Int y & more]
- (reduce bit-and-not (bit-and-not x y) more)))
+ (reduce bit-and-not (bit-and-not x y) more)))
(defn bit-clear
"Clear bit at index n"
@@ -1061,12 +1061,12 @@
{:added "1.0"}
(^Map [^Map map] map)
(^Map [^Map map key]
- (dissoc__ map key))
+ (dissoc__ map key))
(^Map [^Map map key & ks]
- (let [ret (dissoc__ map key)]
- (if ks
- (recur ret (first ks) (next ks))
- ret))))
+ (let [ret (dissoc__ map key)]
+ (if ks
+ (recur ret (first ks) (next ks))
+ ret))))
(defn disj
"disj[oin]. Returns a new set of the same (hashed/sorted) type, that
@@ -1074,13 +1074,13 @@
{:added "1.0"}
(^MapSet [^Set set] set)
(^MapSet [^Set set key]
- (disj__ set key))
+ (disj__ set key))
(^MapSet [^Set set key & ks]
- (when set
- (let [ret (disj__ set key)]
- (if ks
- (recur ret (first ks) (next ks))
- ret)))))
+ (when set
+ (let [ret (disj__ set key)]
+ (if ks
+ (recur ret (first ks) (next ks))
+ ret)))))
(defn find
"Returns the map entry for key, or nil if key not present."
@@ -1241,7 +1241,7 @@
`(let [temp# ~tst]
(if temp#
(let [~form temp#
- t# ~then] ; to avoid "redundant do form" warning from linter if ~then is (do...)
+ t# ~then] ; to avoid "redundant do form" warning from linter if ~then is (do...)
t#)))))
([bindings then else & oldform]
(assert-args
@@ -1252,7 +1252,7 @@
`(let [temp# ~tst]
(if temp#
(let [~form temp#
- t# ~then] ; to avoid "redundant do form" warning from linter if ~then is (do...)
+ t# ~then] ; to avoid "redundant do form" warning from linter if ~then is (do...)
t#)
~else)))))
@@ -1289,7 +1289,7 @@
(if (nil? temp#)
~else
(let [~form temp#
- t# ~then] ; to avoid "redundant do form" warning from linter if ~then is (do...)
+ t# ~then] ; to avoid "redundant do form" warning from linter if ~then is (do...)
t#))))))
(defmacro when-some
@@ -1493,26 +1493,26 @@
(^Fn [] identity)
(^Fn [^Callable f] f)
(^Fn [^Callable f ^Callable g]
- (fn
- ([] (f (g)))
- ([x] (f (g x)))
- ([x y] (f (g x y)))
- ([x y z] (f (g x y z)))
- ([x y z & args] (f (apply g x y z args)))))
+ (fn
+ ([] (f (g)))
+ ([x] (f (g x)))
+ ([x y] (f (g x y)))
+ ([x y z] (f (g x y z)))
+ ([x y z & args] (f (apply g x y z args)))))
(^Fn [^Callable f ^Callable g ^Callable h]
- (fn
- ([] (f (g (h))))
- ([x] (f (g (h x))))
- ([x y] (f (g (h x y))))
- ([x y z] (f (g (h x y z))))
- ([x y z & args] (f (g (apply h x y z args))))))
+ (fn
+ ([] (f (g (h))))
+ ([x] (f (g (h x))))
+ ([x y] (f (g (h x y))))
+ ([x y z] (f (g (h x y z))))
+ ([x y z & args] (f (g (apply h x y z args))))))
(^Fn [^Callable f1 ^Callable f2 ^Callable f3 & fs]
- (let [fs (reverse (list* f1 f2 f3 fs))]
- (fn [& args]
- (loop [ret (apply (first fs) args) fs (next fs)]
- (if fs
- (recur ((first fs) ret) (next fs))
- ret))))))
+ (let [fs (reverse (list* f1 f2 f3 fs))]
+ (fn [& args]
+ (loop [ret (apply (first fs) args) fs (next fs)]
+ (if fs
+ (recur ((first fs) ret) (next fs))
+ ret))))))
(defn juxt
"Takes a set of functions and returns a fn that is the juxtaposition
@@ -1522,34 +1522,34 @@
((juxt a b c) x) => [(a x) (b x) (c x)]"
{:added "1.0"}
(^Fn [^Callable f]
- (fn
- ([] [(f)])
- ([x] [(f x)])
- ([x y] [(f x y)])
- ([x y z] [(f x y z)])
- ([x y z & args] [(apply f x y z args)])))
+ (fn
+ ([] [(f)])
+ ([x] [(f x)])
+ ([x y] [(f x y)])
+ ([x y z] [(f x y z)])
+ ([x y z & args] [(apply f x y z args)])))
(^Fn [^Callable f ^Callable g]
- (fn
- ([] [(f) (g)])
- ([x] [(f x) (g x)])
- ([x y] [(f x y) (g x y)])
- ([x y z] [(f x y z) (g x y z)])
- ([x y z & args] [(apply f x y z args) (apply g x y z args)])))
+ (fn
+ ([] [(f) (g)])
+ ([x] [(f x) (g x)])
+ ([x y] [(f x y) (g x y)])
+ ([x y z] [(f x y z) (g x y z)])
+ ([x y z & args] [(apply f x y z args) (apply g x y z args)])))
(^Fn [^Callable f ^Callable g ^Callable h]
- (fn
- ([] [(f) (g) (h)])
- ([x] [(f x) (g x) (h x)])
- ([x y] [(f x y) (g x y) (h x y)])
- ([x y z] [(f x y z) (g x y z) (h x y z)])
- ([x y z & args] [(apply f x y z args) (apply g x y z args) (apply h x y z args)])))
+ (fn
+ ([] [(f) (g) (h)])
+ ([x] [(f x) (g x) (h x)])
+ ([x y] [(f x y) (g x y) (h x y)])
+ ([x y z] [(f x y z) (g x y z) (h x y z)])
+ ([x y z & args] [(apply f x y z args) (apply g x y z args) (apply h x y z args)])))
(^Fn [^Callable f ^Callable g ^Callable h & fs]
- (let [fs (list* f g h fs)]
- (fn
- ([] (reduce #(conj %1 (%2)) [] fs))
- ([x] (reduce #(conj %1 (%2 x)) [] fs))
- ([x y] (reduce #(conj %1 (%2 x y)) [] fs))
- ([x y z] (reduce #(conj %1 (%2 x y z)) [] fs))
- ([x y z & args] (reduce #(conj %1 (apply %2 x y z args)) [] fs))))))
+ (let [fs (list* f g h fs)]
+ (fn
+ ([] (reduce #(conj %1 (%2)) [] fs))
+ ([x] (reduce #(conj %1 (%2 x)) [] fs))
+ ([x y] (reduce #(conj %1 (%2 x y)) [] fs))
+ ([x y z] (reduce #(conj %1 (%2 x y z)) [] fs))
+ ([x y z & args] (reduce #(conj %1 (apply %2 x y z args)) [] fs))))))
(defn partial
"Takes a function f and fewer than the normal arguments to f, and
@@ -1558,13 +1558,13 @@
{:added "1.0"}
(^Fn [^Callable f] f)
(^Fn [^Callable f arg1]
- (fn [& args] (apply f arg1 args)))
+ (fn [& args] (apply f arg1 args)))
(^Fn [^Callable f arg1 arg2]
- (fn [& args] (apply f arg1 arg2 args)))
+ (fn [& args] (apply f arg1 arg2 args)))
(^Fn [^Callable f arg1 arg2 arg3]
- (fn [& args] (apply f arg1 arg2 arg3 args)))
+ (fn [& args] (apply f arg1 arg2 arg3 args)))
(^Fn [^Callable f arg1 arg2 arg3 & more]
- (fn [& args] (apply f arg1 arg2 arg3 (concat more args)))))
+ (fn [& args] (apply f arg1 arg2 arg3 (concat more args)))))
(defn sequence
"Coerces coll to a (possibly empty) sequence, if it is not already
@@ -1618,28 +1618,28 @@
f should accept number-of-colls arguments."
{:added "1.0"}
(^Seq [^Callable f ^Seqable coll]
- (lazy-seq
- (when-let [s (seq coll)]
- (cons (f (first s)) (map f (rest s))))))
+ (lazy-seq
+ (when-let [s (seq coll)]
+ (cons (f (first s)) (map f (rest s))))))
(^Seq [^Callable f ^Seqable c1 ^Seqable c2]
- (lazy-seq
- (let [s1 (seq c1) s2 (seq c2)]
- (when (and s1 s2)
- (cons (f (first s1) (first s2))
- (map f (rest s1) (rest s2)))))))
+ (lazy-seq
+ (let [s1 (seq c1) s2 (seq c2)]
+ (when (and s1 s2)
+ (cons (f (first s1) (first s2))
+ (map f (rest s1) (rest s2)))))))
(^Seq [^Callable f ^Seqable c1 ^Seqable c2 ^Seqable c3]
- (lazy-seq
- (let [s1 (seq c1) s2 (seq c2) s3 (seq c3)]
- (when (and s1 s2 s3)
- (cons (f (first s1) (first s2) (first s3))
- (map f (rest s1) (rest s2) (rest s3)))))))
+ (lazy-seq
+ (let [s1 (seq c1) s2 (seq c2) s3 (seq c3)]
+ (when (and s1 s2 s3)
+ (cons (f (first s1) (first s2) (first s3))
+ (map f (rest s1) (rest s2) (rest s3)))))))
(^Seq [^Callable f ^Seqable c1 ^Seqable c2 ^Seqable c3 & colls]
- (let [step (fn step [cs]
- (lazy-seq
- (let [ss (map seq cs)]
- (when (every? identity ss)
- (cons (map first ss) (step (map rest ss)))))))]
- (map #(apply f %) (step (conj colls c3 c2 c1))))))
+ (let [step (fn step [cs]
+ (lazy-seq
+ (let [ss (map seq cs)]
+ (when (every? identity ss)
+ (cons (map first ss) (step (map rest ss)))))))]
+ (map #(apply f %) (step (conj colls c3 c2 c1))))))
(defn mapcat
"Returns the result of applying concat to the result of applying map
@@ -1653,12 +1653,12 @@
(pred item) returns true. pred must be free of side-effects."
{:added "1.0"}
(^Seq [^Callable pred ^Seqable coll]
- (lazy-seq
- (when-let [s (seq coll)]
- (let [f (first s) r (rest s)]
- (if (pred f)
- (cons f (filter pred r))
- (filter pred r)))))))
+ (lazy-seq
+ (when-let [s (seq coll)]
+ (let [f (first s) r (rest s)]
+ (if (pred f)
+ (cons f (filter pred r))
+ (filter pred r)))))))
(defn remove
"Returns a lazy sequence of the items in coll for which
@@ -1767,14 +1767,14 @@
(^Seq [^Number end] (range 0 end 1))
(^Seq [^Number start ^Number end] (range start end 1))
(^Seq [^Number start ^Number end ^Number step]
- (lazy-seq
- (let [comp (cond
- (or (zero? step) (= start end)) not=
- (pos? step) <
- (neg? step) >)]
- (if (comp start end)
- (cons start (range (+ start step) end step))
- ())))))
+ (lazy-seq
+ (let [comp (cond
+ (or (zero? step) (= start end)) not=
+ (pos? step) <
+ (neg? step) >)]
+ (if (comp start end)
+ (cons start (range (+ start step) end step))
+ ())))))
(defn merge
"Returns a map that consists of the rest of the maps conj-ed onto
@@ -1842,9 +1842,9 @@
supplied, uses compare."
{:added "1.0"}
(^Seq [^Seqable coll]
- (sort compare coll))
+ (sort compare coll))
(^Seq [^Comparator comp ^Seqable coll]
- (sort__ comp coll)))
+ (sort__ comp coll)))
(defn sort-by
"Returns a sorted sequence of the items in coll, where the sort
@@ -1852,9 +1852,9 @@
supplied, uses compare."
{:added "1.0"}
(^Seq [^Callable keyfn ^Seqable coll]
- (sort-by keyfn compare coll))
+ (sort-by keyfn compare coll))
(^Seq [^Callable keyfn ^Comparator comp ^Seqable coll]
- (sort (fn [x y] (comp (keyfn x) (keyfn y))) coll)))
+ (sort (fn [x y] (comp (keyfn x) (keyfn y))) coll)))
(defn dorun
"When lazy sequences are produced via functions that have side
@@ -1864,11 +1864,11 @@
the seq, does not retain the head and returns nil."
{:added "1.0"}
(^Nil [^Seqable coll]
- (when (seq coll)
- (recur (next coll))))
+ (when (seq coll)
+ (recur (next coll))))
(^Nil [^Number n ^Seqable coll]
- (when (and (seq coll) (pos? n))
- (recur (dec n) (next coll)))))
+ (when (and (seq coll) (pos? n))
+ (recur (dec n) (next coll)))))
(defn doall
"When lazy sequences are produced via functions that have side
@@ -1879,11 +1879,11 @@
seq to reside in memory at one time."
{:added "1.0"}
(^Seq [^Seqable coll]
- (dorun coll)
- coll)
+ (dorun coll)
+ coll)
(^Seq [^Number n ^Seqable coll]
- (dorun n coll)
- coll))
+ (dorun n coll)
+ coll))
(defn nthnext
"Returns the nth next of coll, (seq coll) when n is 0."
@@ -1911,20 +1911,20 @@
not enough padding elements, return a partition with less than n items."
{:added "1.0"}
(^Seq [^Number n ^Seqable coll]
- (partition n n coll))
+ (partition n n coll))
(^Seq [^Number n ^Number step ^Seqable coll]
- (lazy-seq
- (when-let [s (seq coll)]
- (let [p (doall (take n s))]
- (when (= n (count p))
- (cons p (partition n step (nthrest s step))))))))
+ (lazy-seq
+ (when-let [s (seq coll)]
+ (let [p (doall (take n s))]
+ (when (= n (count p))
+ (cons p (partition n step (nthrest s step))))))))
(^Seq [^Number n ^Number step ^Seqable pad ^Seqable coll]
- (lazy-seq
- (when-let [s (seq coll)]
- (let [p (doall (take n s))]
- (if (= n (count p))
- (cons p (partition n step pad (nthrest s step)))
- (list (take n (concat p pad)))))))))
+ (lazy-seq
+ (when-let [s (seq coll)]
+ (let [p (doall (take n s))]
+ (if (= n (count p))
+ (cons p (partition n step pad (nthrest s step)))
+ (list (take n (concat p pad)))))))))
(defn eval
"Evaluates the form data structure (not text!) and returns the result."
@@ -2160,9 +2160,9 @@
trimming is done."
{:added "1.0"}
(^Vector [^Vector v ^Number start]
- (subvec v start (count v)))
+ (subvec v start (count v)))
(^Vector [^Vector v ^Number start ^Number end]
- (subvec__ v start end)))
+ (subvec__ v start end)))
(defmacro doto
"Evaluates x then calls all of the methods and functions with the
@@ -2331,15 +2331,15 @@
metadata from the name symbol. Returns the var."
{:added "1.0"}
(^Var [ns ^Symbol name]
- ;; TODO: types (Namespace or Symbol)
- (let [v (intern__ (the-ns ns) name)]
- (when (meta name) (set-meta__ v (meta name)))
- v))
+ ;; TODO: types (Namespace or Symbol)
+ (let [v (intern__ (the-ns ns) name)]
+ (when (meta name) (set-meta__ v (meta name)))
+ v))
(^Var [ns ^Symbol name val]
- ;; TODO: types (Namespace or Symbol)
- (let [v (intern__ (the-ns ns) name val)]
- (when (meta name) (set-meta__ v (meta name)))
- v)))
+ ;; TODO: types (Namespace or Symbol)
+ (let [v (intern__ (the-ns ns) name val)]
+ (when (meta name) (set-meta__ v (meta name)))
+ v)))
(defn refer
"refers to all public vars of ns, subject to filters.
@@ -2431,16 +2431,16 @@
(^Seq [] ())
(^Seq [^Seqable c1] (lazy-seq c1))
(^Seq [^Seqable c1 ^Seqable c2]
- (lazy-seq
- (let [s1 (seq c1) s2 (seq c2)]
- (when (and s1 s2)
- (cons (first s1) (cons (first s2)
- (interleave (rest s1) (rest s2))))))))
+ (lazy-seq
+ (let [s1 (seq c1) s2 (seq c2)]
+ (when (and s1 s2)
+ (cons (first s1) (cons (first s2)
+ (interleave (rest s1) (rest s2))))))))
(^Seq [^Seqable c1 ^Seqable c2 & colls]
- (lazy-seq
- (let [ss (map seq (conj colls c2 c1))]
- (when (every? identity ss)
- (concat (map first ss) (apply interleave (map rest ss))))))))
+ (lazy-seq
+ (let [ss (map seq (conj colls c2 c1))]
+ (when (every? identity ss)
+ (concat (map first ss) (apply interleave (map rest ss))))))))
(defn ns-resolve
"Returns the var or type to which a symbol will be resolved in the
@@ -2450,10 +2450,10 @@
{:added "1.0"}
;; TODO: ns is namespace or symbol
(^Var [ns ^Symbol sym]
- (ns-resolve ns nil sym))
+ (ns-resolve ns nil sym))
(^Var [ns ^Gettable env ^Symbol sym]
- (when-not (contains? env sym)
- (ns-resolve__ (the-ns ns) sym))))
+ (when-not (contains? env sym)
+ (ns-resolve__ (the-ns ns) sym))))
(defn resolve
"Same as (ns-resolve *ns* sym) or (ns-resolve *ns* env sym)"
@@ -2545,9 +2545,9 @@
(let [mkns (namespace mk)
mkn (name mk)]
(cond (= mkn "keys") (assoc transforms mk #(keyword (or mkns (namespace %)) (name %)))
- (= mkn "syms") (assoc transforms mk #(list `quote (symbol (or mkns (namespace %)) (name %))))
- (= mkn "strs") (assoc transforms mk str)
- :else transforms))
+ (= mkn "syms") (assoc transforms mk #(list `quote (symbol (or mkns (namespace %)) (name %))))
+ (= mkn "strs") (assoc transforms mk str)
+ :else transforms))
transforms))
{}
(keys b))]
@@ -3101,14 +3101,14 @@
(^Boolean [x] true)
(^Boolean [x y] (not (= x y)))
(^Boolean [x y & more]
- (if (not= x y)
- (loop [s #{x y} [x & etc :as xs] more]
- (if xs
- (if (contains? s x)
- false
- (recur (conj s x) etc))
- true))
- false)))
+ (if (not= x y)
+ (loop [s #{x y} [x & etc :as xs] more]
+ (if xs
+ (if (contains? s x)
+ false
+ (recur (conj s x) etc))
+ true))
+ false)))
(defn format
"Formats a string using fmt.Sprintf"
@@ -3140,7 +3140,7 @@
(let [process-reference
(fn [[kname & args]]
`(~(symbol "joker.core" (joker.core/name kname))
- ~@(map #(list 'quote %) args)))
+ ~@(map #(list 'quote %) args)))
docstring (when (string? (first references)) (first references))
references (if docstring (next references) references)
name (if docstring
@@ -3319,9 +3319,9 @@
{:keys [as reload reload-all require use verbose default]} opts
loaded (contains? *loaded-libs* lib)
load (cond reload-all
- load-all
- (or reload (not require) (not loaded))
- load-one)
+ load-all
+ (or reload (not require) (not loaded))
+ load-one)
need-ns (or as use default)
filter-opts (select-keys opts require-opt-keys)
undefined-on-entry (not (find-ns lib))]
@@ -3549,10 +3549,10 @@
created."
{:added "1.0"}
(^Map [^Associative m ^Seqable ks ^Callable f & args]
- (let [[k & ks] ks]
- (if ks
- (assoc m k (apply update-in (get m k) ks f args))
- (assoc m k (apply f (get m k) args))))))
+ (let [[k & ks] ks]
+ (if ks
+ (assoc m k (apply update-in (get m k) ks f args))
+ (assoc m k (apply f (get m k) args))))))
(defn update
"'Updates' a value in an associative structure, where k is a
@@ -3561,15 +3561,15 @@
structure. If the key does not exist, nil is passed as the old value."
{:added "1.0"}
(^Map [^Associative m k ^Callable f]
- (assoc m k (f (get m k))))
+ (assoc m k (f (get m k))))
(^Map [^Associative m k ^Callable f x]
- (assoc m k (f (get m k) x)))
+ (assoc m k (f (get m k) x)))
(^Map [^Associative m k ^Callable f x y]
- (assoc m k (f (get m k) x y)))
+ (assoc m k (f (get m k) x y)))
(^Map [^Associative m k ^Callable f x y z]
- (assoc m k (f (get m k) x y z)))
+ (assoc m k (f (get m k) x y z)))
(^Map [^Associative m k ^Callable f x y z & more]
- (assoc m k (apply f (get m k) x y z more))))
+ (assoc m k (apply f (get m k) x y z more))))
(defn coll?
"Returns true if x implements Collection"
@@ -3832,33 +3832,33 @@
arguments, not just the one(s) being nil-patched."
{:added "1.0"}
(^Fn [^Callable f x]
- (fn
- ([a] (f (if (nil? a) x a)))
- ([a b] (f (if (nil? a) x a) b))
- ([a b c] (f (if (nil? a) x a) b c))
- ([a b c & ds] (apply f (if (nil? a) x a) b c ds))))
+ (fn
+ ([a] (f (if (nil? a) x a)))
+ ([a b] (f (if (nil? a) x a) b))
+ ([a b c] (f (if (nil? a) x a) b c))
+ ([a b c & ds] (apply f (if (nil? a) x a) b c ds))))
(^Fn [^Callable f x y]
- (fn
- ([a b] (f (if (nil? a) x a) (if (nil? b) y b)))
- ([a b c] (f (if (nil? a) x a) (if (nil? b) y b) c))
- ([a b c & ds] (apply f (if (nil? a) x a) (if (nil? b) y b) c ds))))
+ (fn
+ ([a b] (f (if (nil? a) x a) (if (nil? b) y b)))
+ ([a b c] (f (if (nil? a) x a) (if (nil? b) y b) c))
+ ([a b c & ds] (apply f (if (nil? a) x a) (if (nil? b) y b) c ds))))
(^Fn [^Callable f x y z]
- (fn
- ([a b] (f (if (nil? a) x a) (if (nil? b) y b)))
- ([a b c] (f (if (nil? a) x a) (if (nil? b) y b) (if (nil? c) z c)))
- ([a b c & ds] (apply f (if (nil? a) x a) (if (nil? b) y b) (if (nil? c) z c) ds)))))
+ (fn
+ ([a b] (f (if (nil? a) x a) (if (nil? b) y b)))
+ ([a b c] (f (if (nil? a) x a) (if (nil? b) y b) (if (nil? c) z c)))
+ ([a b c & ds] (apply f (if (nil? a) x a) (if (nil? b) y b) (if (nil? c) z c) ds)))))
(defn partition-all
"Returns a lazy sequence of lists like partition, but may include
partitions with fewer than n items at the end."
{:added "1.0"}
(^Seq [^Number n ^Seqable coll]
- (partition-all n n coll))
+ (partition-all n n coll))
(^Seq [^Number n ^Number step ^Seqable coll]
- (lazy-seq
- (when-let [s (seq coll)]
- (let [seg (doall (take n s))]
- (cons seg (partition-all n step (nthrest s step))))))))
+ (lazy-seq
+ (when-let [s (seq coll)]
+ (let [seg (doall (take n s))]
+ (cons seg (partition-all n step (nthrest s step))))))))
(defn into
"Returns a new coll consisting of to-coll with all of the items of
@@ -3911,13 +3911,13 @@
f should accept number-of-colls arguments."
{:added "1.0"}
(^Vector [^Callable f coll]
- (reduce (fn [v o] (conj v (f o))) [] coll))
+ (reduce (fn [v o] (conj v (f o))) [] coll))
(^Vector [^Callable f c1 c2]
- (into [] (map f c1 c2)))
+ (into [] (map f c1 c2)))
(^Vector [^Callable f c1 c2 c3]
- (into [] (map f c1 c2 c3)))
+ (into [] (map f c1 c2 c3)))
(^Vector [^Callable f c1 c2 c3 & colls]
- (into [] (apply map f c1 c2 c3 colls))))
+ (into [] (apply map f c1 c2 c3 colls))))
(defn filterv
"Returns a vector of the items in coll for which
@@ -3992,15 +3992,15 @@
per reduce) of coll by f, starting with init."
{:added "1.0"}
(^Seq [^Callable f ^Seqable coll]
- (lazy-seq
- (if-let [s (seq coll)]
- (reductions f (first s) (rest s))
- (list (f)))))
+ (lazy-seq
+ (if-let [s (seq coll)]
+ (reductions f (first s) (rest s))
+ (list (f)))))
(^Seq [^Callable f init ^Seqable coll]
- (cons init
- (lazy-seq
- (when-let [s (seq coll)]
- (reductions f (f init (first s)) (rest s)))))))
+ (cons init
+ (lazy-seq
+ (when-let [s (seq coll)]
+ (reductions f (f init (first s)) (rest s)))))))
(defn rand-nth
"Return a random element of the (sequential) collection. Will have
@@ -4076,34 +4076,34 @@
argument that triggers a logical false result against the original predicates."
{:added "1.0"}
(^Fn [^Callable p]
- (fn ep1 ([] true)
- ([x] (boolean (p x)))
- ([x y] (boolean (and (p x) (p y))))
- ([x y z] (boolean (and (p x) (p y) (p z))))
- ([x y z & args] (boolean (and (ep1 x y z)
- (every? p args))))))
+ (fn ep1 ([] true)
+ ([x] (boolean (p x)))
+ ([x y] (boolean (and (p x) (p y))))
+ ([x y z] (boolean (and (p x) (p y) (p z))))
+ ([x y z & args] (boolean (and (ep1 x y z)
+ (every? p args))))))
(^Fn [^Callable p1 ^Callable p2]
- (fn ep2 ([] true)
- ([x] (boolean (and (p1 x) (p2 x))))
- ([x y] (boolean (and (p1 x) (p1 y) (p2 x) (p2 y))))
- ([x y z] (boolean (and (p1 x) (p1 y) (p1 z) (p2 x) (p2 y) (p2 z))))
- ([x y z & args] (boolean (and (ep2 x y z)
- (every? #(and (p1 %) (p2 %)) args))))))
+ (fn ep2 ([] true)
+ ([x] (boolean (and (p1 x) (p2 x))))
+ ([x y] (boolean (and (p1 x) (p1 y) (p2 x) (p2 y))))
+ ([x y z] (boolean (and (p1 x) (p1 y) (p1 z) (p2 x) (p2 y) (p2 z))))
+ ([x y z & args] (boolean (and (ep2 x y z)
+ (every? #(and (p1 %) (p2 %)) args))))))
(^Fn [^Callable p1 ^Callable p2 ^Callable p3]
- (fn ep3 ([] true)
- ([x] (boolean (and (p1 x) (p2 x) (p3 x))))
- ([x y] (boolean (and (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y))))
- ([x y z] (boolean (and (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y) (p1 z) (p2 z) (p3 z))))
- ([x y z & args] (boolean (and (ep3 x y z)
- (every? #(and (p1 %) (p2 %) (p3 %)) args))))))
+ (fn ep3 ([] true)
+ ([x] (boolean (and (p1 x) (p2 x) (p3 x))))
+ ([x y] (boolean (and (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y))))
+ ([x y z] (boolean (and (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y) (p1 z) (p2 z) (p3 z))))
+ ([x y z & args] (boolean (and (ep3 x y z)
+ (every? #(and (p1 %) (p2 %) (p3 %)) args))))))
(^Fn [^Callable p1 ^Callable p2 ^Callable p3 & ps]
- (let [ps (list* p1 p2 p3 ps)]
- (fn epn ([] true)
- ([x] (every? #(% x) ps))
- ([x y] (every? #(and (% x) (% y)) ps))
- ([x y z] (every? #(and (% x) (% y) (% z)) ps))
- ([x y z & args] (boolean (and (epn x y z)
- (every? #(every? % args) ps))))))))
+ (let [ps (list* p1 p2 p3 ps)]
+ (fn epn ([] true)
+ ([x] (every? #(% x) ps))
+ ([x y] (every? #(and (% x) (% y)) ps))
+ ([x y z] (every? #(and (% x) (% y) (% z)) ps))
+ ([x y z & args] (boolean (and (epn x y z)
+ (every? #(every? % args) ps))))))))
(defn some-fn
"Takes a set of predicates and returns a function f that returns the first logical true value
@@ -4112,34 +4112,34 @@
argument that triggers a logical true result against the original predicates."
{:added "1.0"}
(^Fn [^Callable p]
- (fn sp1 ([] nil)
- ([x] (p x))
- ([x y] (or (p x) (p y)))
- ([x y z] (or (p x) (p y) (p z)))
- ([x y z & args] (or (sp1 x y z)
- (some p args)))))
+ (fn sp1 ([] nil)
+ ([x] (p x))
+ ([x y] (or (p x) (p y)))
+ ([x y z] (or (p x) (p y) (p z)))
+ ([x y z & args] (or (sp1 x y z)
+ (some p args)))))
(^Fn [^Callable p1 ^Callable p2]
- (fn sp2 ([] nil)
- ([x] (or (p1 x) (p2 x)))
- ([x y] (or (p1 x) (p1 y) (p2 x) (p2 y)))
- ([x y z] (or (p1 x) (p1 y) (p1 z) (p2 x) (p2 y) (p2 z)))
- ([x y z & args] (or (sp2 x y z)
- (some #(or (p1 %) (p2 %)) args)))))
+ (fn sp2 ([] nil)
+ ([x] (or (p1 x) (p2 x)))
+ ([x y] (or (p1 x) (p1 y) (p2 x) (p2 y)))
+ ([x y z] (or (p1 x) (p1 y) (p1 z) (p2 x) (p2 y) (p2 z)))
+ ([x y z & args] (or (sp2 x y z)
+ (some #(or (p1 %) (p2 %)) args)))))
(^Fn [^Callable p1 ^Callable p2 ^Callable p3]
- (fn sp3 ([] nil)
- ([x] (or (p1 x) (p2 x) (p3 x)))
- ([x y] (or (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y)))
- ([x y z] (or (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y) (p1 z) (p2 z) (p3 z)))
- ([x y z & args] (or (sp3 x y z)
- (some #(or (p1 %) (p2 %) (p3 %)) args)))))
+ (fn sp3 ([] nil)
+ ([x] (or (p1 x) (p2 x) (p3 x)))
+ ([x y] (or (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y)))
+ ([x y z] (or (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y) (p1 z) (p2 z) (p3 z)))
+ ([x y z & args] (or (sp3 x y z)
+ (some #(or (p1 %) (p2 %) (p3 %)) args)))))
(^Fn [^Callable p1 ^Callable p2 ^Callable p3 & ps]
- (let [ps (list* p1 p2 p3 ps)]
- (fn spn ([] nil)
- ([x] (some #(% x) ps))
- ([x y] (some #(or (% x) (% y)) ps))
- ([x y z] (some #(or (% x) (% y) (% z)) ps))
- ([x y z & args] (or (spn x y z)
- (some #(some % args) ps)))))))
+ (let [ps (list* p1 p2 p3 ps)]
+ (fn spn ([] nil)
+ ([x] (some #(% x) ps))
+ ([x y] (some #(or (% x) (% y)) ps))
+ ([x y z] (some #(or (% x) (% y) (% z)) ps))
+ ([x y z & args] (or (spn x y z)
+ (some #(some % args) ps)))))))
(defn- ^{:dynamic true} assert-valid-fdecl
"A good fdecl looks like (([a] ...) ([a b] ...)) near the end of defn."
@@ -4288,6 +4288,28 @@
overridden by binding *data-readers*."
{})
+(defn update-keys
+ "m f => {(f k) v ...}
+ Given a map m and a function f of 1-argument, returns a new map whose
+ keys are the result of applying f to the keys of m, mapped to the
+ corresponding values of m.
+ f must return a unique key for each key of m, else the behavior is undefined."
+ {:added "1.1"}
+ ^Map [m ^Callable f]
+ (with-meta
+ (reduce-kv (fn [acc k v] (assoc acc (f k) v)) {} m)
+ (meta m)))
+
+(defn update-vals
+ "m f => {k (f v) ...}
+ Given a map m and a function f of 1-argument, returns a new map where the keys of m
+ are mapped to result of applying f to the corresponding values of m."
+ {:added "1.1"}
+ ^Map [m ^Callable f]
+ (with-meta
+ (reduce-kv (fn [acc k v] (assoc acc k (f v))) {} m)
+ (meta m)))
+
(defn joker-version
"Returns joker version as a printable string."
{:added "1.0"}
@@ -4516,9 +4538,9 @@
For more info, see: https://github.com/jcburley/go-spew"
{:added "1.0"}
(^Boolean [o]
- (go-spew__ o))
+ (go-spew__ o))
(^Boolean [o ^Map cfg]
- (go-spew__ o cfg)))
+ (go-spew__ o cfg)))
(defn- verbosity-level
"Verbosity level as specified via the --verbose option to Joker."
diff --git a/core/data/linter_clj.joke b/core/data/linter_clj.joke
index dcdf624ba..c6cc134ba 100644
--- a/core/data/linter_clj.joke
+++ b/core/data/linter_clj.joke
@@ -51,7 +51,7 @@
(when-not (resolve sym)
(intern__ *ns* sym)))
-(doseq [sym '(clojure.edn clojure.core clojure.uuid clojure.core.server clojure.java.io clojure.main clojure.core.protocols clojure.instant clojure.string)]
+(doseq [sym '(clojure.edn clojure.core clojure.uuid clojure.core.server clojure.java.io clojure.main clojure.core.protocols clojure.instant clojure.string clojure.datafy clojure.math)]
(inject-ns__ sym))
;; Unsupported arities
@@ -303,6 +303,18 @@
([opts stream]))
(defn PrintWriter-on [flush-fn close-fn])
+(defn abs ^Number [^Number num])
+(defn NaN? ^Boolean [^Number num])
+(defn infinite? ^Boolean [^Number num])
+
+(defn parse-double ^Double [^String s])
+(defn parse-long ^Number [^String s])
+(defn parse-boolean ^Boolean [^String s])
+(defn parse-uuid [^String s])
+(defn random-uuid [])
+
+(defn iteration ^Seqable [^Callable step & opts])
+
;; Clojure core macros not supported by Joker
(defn gen-class [& options])
From 462803e074d6680c3f28e8ff29994ebf9d4a1c8a Mon Sep 17 00:00:00 2001
From: Roman Bataev
Date: Tue, 8 Nov 2022 22:14:18 -0500
Subject: [PATCH 5/5] v1.1.0
---
core/procs.go | 2 +-
docs/joker.core.html | 62 +++++++++++++++++++++++++++++++++-----------
docs/main.js | 2 +-
3 files changed, 49 insertions(+), 17 deletions(-)
diff --git a/core/procs.go b/core/procs.go
index b117d090a..9b4aeb5c4 100644
--- a/core/procs.go
+++ b/core/procs.go
@@ -38,7 +38,7 @@ const (
PRINT_IF_NOT_NIL
)
-const VERSION = "v1.0.2"
+const VERSION = "v1.1.0"
const (
CLJ Dialect = iota
diff --git a/docs/joker.core.html b/docs/joker.core.html
index 447f4b2c0..44dc04de0 100644
--- a/docs/joker.core.html
+++ b/docs/joker.core.html
@@ -1132,6 +1132,12 @@ Index
update-in
+
+ update-keys
+
+
+ update-vals
+
use
@@ -1549,7 +1555,7 @@ <!
Takes a value from ch.
Returns nil if ch is closed and nothing is available on ch.
Blocks if nothing is available on ch and ch is not closed.
- source
+ source
show types
@@ -1616,7 +1622,7 @@ >!
Throws an exception if val is nil.
Blocks if ch is full (no buffer space is available).
Returns true unless ch is already closed.
- source
+ source
show types
@@ -2058,7 +2064,7 @@ chan
(chan n)
^Channel (chan ^Int n)
Returns a new channel with an optional buffer of size n.
- source
+ source
show types
@@ -2115,7 +2121,7 @@ close!
Logically closing happens after all puts have been delivered. Therefore, any
blocked puts will remain blocked until a taker releases them.
- source
+ source
show types
@@ -2411,7 +2417,7 @@ defmethod
(defmethod multifn dispatch-val & fn-tail)
Creates and installs a new method of multimethod associated with dispatch-value.
- source
+ source
@@ -2442,7 +2448,7 @@ defmulti
Multimethods expect the value of the hierarchy option to be supplied as
a reference type e.g. a var (i.e. via the Var-quote dispatch macro #'
or the var special form).
- source
+ source
@@ -2813,7 +2819,7 @@ exit
(exit code)
(exit ^Int code)
Causes the current program to exit with the given status code (defaults to 0).
- source
+ source
show types
@@ -3079,7 +3085,7 @@ get-method
Given a multimethod and a dispatch value, returns the dispatch fn
that would apply to that value, or nil if none apply and no default
- source
+ source
show types
@@ -3101,7 +3107,7 @@ go
So using goroutines only makes sense if you do I/O (specifically, calling the above functions)
inside them. Also, note that a goroutine may never have a chance to run if the root goroutine
(or another goroutine) doesn't do any I/O or channel operations (<! or >!).
- source
+ source
@@ -3368,7 +3374,7 @@ joker-version
(joker-version)
^String (joker-version)
Returns joker version as a printable string.
- source
+ source
show types
@@ -3788,7 +3794,7 @@ methods
(methods multifn)
^Map (methods multifn)
Given a multimethod, returns a map of dispatch values -> dispatch fns
- source
+ source
show types
@@ -4352,7 +4358,7 @@ prefer-method
Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y
when there is a conflict
- source
+ source
@@ -4362,7 +4368,7 @@ prefers
(prefers multifn)
^Map (prefers multifn)
Given a multimethod, returns a map of preferred value -> set of other values
- source
+ source
show types
@@ -4775,7 +4781,7 @@ remove-all-methods
(remove-all-methods multifn)
Removes all of the methods of multimethod.
- source
+ source
@@ -4785,7 +4791,7 @@ remove-method
(remove-method multifn dispatch-val)
Removes the method of multimethod associated with dispatch-value.
- source
+ source
@@ -5549,6 +5555,32 @@ update-in
source
show types
+
+ update-keys
+ Function
+ v1.1
+ (update-keys m f)
^Map (update-keys m ^Callable f)
+
+ m f => {(f k) v ...}
+ Given a map m and a function f of 1-argument, returns a new map whose
+ keys are the result of applying f to the keys of m, mapped to the
+ corresponding values of m.
+ f must return a unique key for each key of m, else the behavior is undefined.
+ source
+ show types
+
+
+ update-vals
+ Function
+ v1.1
+ (update-vals m f)
^Map (update-vals m ^Callable f)
+
+ m f => {k (f v) ...}
+ Given a map m and a function f of 1-argument, returns a new map where the keys of m
+ are mapped to result of applying f to the corresponding values of m.
+ source
+ show types
+
use
Function
diff --git a/docs/main.js b/docs/main.js
index 4c9ee9824..cd073cc51 100644
--- a/docs/main.js
+++ b/docs/main.js
@@ -4,7 +4,7 @@ function toggleTypes(e) {
e.target.parentNode.querySelectorAll('code').forEach(el => el.classList.toggle('hide'));
}
-const terms = ["joker.base64/decode-string","joker.base64/encode-string","joker.better-cond/cond","joker.better-cond/if-let","joker.better-cond/if-some","joker.better-cond/when-let","joker.better-cond/when-some","joker.bolt/by-prefix","joker.bolt/close","joker.bolt/create-bucket","joker.bolt/create-bucket-if-not-exists","joker.bolt/delete","joker.bolt/delete-bucket","joker.bolt/get","joker.bolt/next-sequence","joker.bolt/open","joker.bolt/put","joker.core/*","joker.core/*'","joker.core/*1","joker.core/*2","joker.core/*3","joker.core/*assert*","joker.core/*command-line-args*","joker.core/*e","joker.core/*err*","joker.core/*file*","joker.core/*flush-on-newline*","joker.core/*in*","joker.core/*joker-version*","joker.core/*linter-config*","joker.core/*linter-mode*","joker.core/*main-file*","joker.core/*ns*","joker.core/*out*","joker.core/*print-readably*","joker.core/+","joker.core/+'","joker.core/-","joker.core/-'","joker.core/->","joker.core/->>","joker.core//","joker.core/<","joker.core/","joker.core/>!","joker.core/>=","joker.core/alias","joker.core/all-ns","joker.core/alter-meta!","joker.core/and","joker.core/any?","joker.core/apply","joker.core/array-map","joker.core/as->","joker.core/assert","joker.core/assoc","joker.core/assoc-in","joker.core/associative?","joker.core/atom","joker.core/bigfloat","joker.core/bigfloat?","joker.core/bigint","joker.core/binding","joker.core/bit-and","joker.core/bit-and-not","joker.core/bit-clear","joker.core/bit-flip","joker.core/bit-not","joker.core/bit-or","joker.core/bit-set","joker.core/bit-shift-left","joker.core/bit-shift-right","joker.core/bit-test","joker.core/bit-xor","joker.core/boolean","joker.core/boolean?","joker.core/bound?","joker.core/bounded-count","joker.core/butlast","joker.core/callable?","joker.core/case","joker.core/cast","joker.core/chan","joker.core/char","joker.core/char?","joker.core/chunked-seq?","joker.core/class","joker.core/close!","joker.core/coll?","joker.core/comment","joker.core/comp","joker.core/compare","joker.core/complement","joker.core/concat","joker.core/cond","joker.core/cond->","joker.core/cond->>","joker.core/condp","joker.core/conj","joker.core/cons","joker.core/constantly","joker.core/contains?","joker.core/count","joker.core/counted?","joker.core/create-ns","joker.core/cycle","joker.core/dec","joker.core/dec'","joker.core/declare","joker.core/dedupe","joker.core/default-data-readers","joker.core/defmacro","joker.core/defmethod","joker.core/defmulti","joker.core/defn","joker.core/defn-","joker.core/defonce","joker.core/delay","joker.core/delay?","joker.core/denominator","joker.core/deref","joker.core/disj","joker.core/dissoc","joker.core/distinct","joker.core/distinct?","joker.core/doall","joker.core/dorun","joker.core/doseq","joker.core/dotimes","joker.core/doto","joker.core/double","joker.core/double?","joker.core/drop","joker.core/drop-last","joker.core/drop-while","joker.core/empty","joker.core/empty?","joker.core/eval","joker.core/even?","joker.core/every-pred","joker.core/every?","joker.core/ex-cause","joker.core/ex-data","joker.core/ex-info","joker.core/ex-message","joker.core/exit","joker.core/false?","joker.core/ffirst","joker.core/filter","joker.core/filterv","joker.core/find","joker.core/find-ns","joker.core/find-var","joker.core/first","joker.core/flatten","joker.core/float?","joker.core/flush","joker.core/fn","joker.core/fn?","joker.core/fnext","joker.core/fnil","joker.core/for","joker.core/force","joker.core/format","joker.core/frequencies","joker.core/gensym","joker.core/get","joker.core/get-in","joker.core/get-method","joker.core/go","joker.core/group-by","joker.core/hash","joker.core/hash-map","joker.core/hash-set","joker.core/ident?","joker.core/identical?","joker.core/identity","joker.core/if-let","joker.core/if-not","joker.core/if-some","joker.core/in-ns","joker.core/inc","joker.core/inc'","joker.core/indexed?","joker.core/instance?","joker.core/int","joker.core/int?","joker.core/integer?","joker.core/interleave","joker.core/intern","joker.core/interpose","joker.core/into","joker.core/iterate","joker.core/joker-version","joker.core/juxt","joker.core/keep","joker.core/keep-indexed","joker.core/key","joker.core/keys","joker.core/keyword","joker.core/keyword?","joker.core/last","joker.core/lazy-cat","joker.core/lazy-seq","joker.core/let","joker.core/letfn","joker.core/line-seq","joker.core/list","joker.core/list*","joker.core/list?","joker.core/load","joker.core/load-file","joker.core/load-string","joker.core/loaded-libs","joker.core/loop","joker.core/macroexpand","joker.core/macroexpand-1","joker.core/map","joker.core/map-indexed","joker.core/map?","joker.core/mapcat","joker.core/mapv","joker.core/max","joker.core/max-key","joker.core/memoize","joker.core/merge","joker.core/merge-with","joker.core/meta","joker.core/methods","joker.core/min","joker.core/min-key","joker.core/mod","joker.core/name","joker.core/namespace","joker.core/nat-int?","joker.core/neg-int?","joker.core/neg?","joker.core/newline","joker.core/next","joker.core/nfirst","joker.core/nil?","joker.core/nnext","joker.core/not","joker.core/not-any?","joker.core/not-empty","joker.core/not-every?","joker.core/not=","joker.core/ns","joker.core/ns-aliases","joker.core/ns-interns","joker.core/ns-map","joker.core/ns-name","joker.core/ns-publics","joker.core/ns-refers","joker.core/ns-resolve","joker.core/ns-sources","joker.core/ns-unalias","joker.core/ns-unmap","joker.core/nth","joker.core/nthnext","joker.core/nthrest","joker.core/num","joker.core/number?","joker.core/numerator","joker.core/odd?","joker.core/or","joker.core/partial","joker.core/partition","joker.core/partition-all","joker.core/partition-by","joker.core/peek","joker.core/pop","joker.core/pos-int?","joker.core/pos?","joker.core/pprint","joker.core/pr","joker.core/pr-err","joker.core/pr-str","joker.core/prefer-method","joker.core/prefers","joker.core/print","joker.core/print-err","joker.core/print-str","joker.core/printf","joker.core/println","joker.core/println-err","joker.core/println-str","joker.core/prn","joker.core/prn-err","joker.core/prn-str","joker.core/qualified-ident?","joker.core/qualified-keyword?","joker.core/qualified-symbol?","joker.core/quot","joker.core/rand","joker.core/rand-int","joker.core/rand-nth","joker.core/random-sample","joker.core/range","joker.core/ratio?","joker.core/rational?","joker.core/re-find","joker.core/re-matches","joker.core/re-pattern","joker.core/re-seq","joker.core/read","joker.core/read-line","joker.core/read-string","joker.core/realized?","joker.core/reduce","joker.core/reduce-kv","joker.core/reductions","joker.core/refer","joker.core/refer-clojure","joker.core/rem","joker.core/remove","joker.core/remove-all-methods","joker.core/remove-method","joker.core/remove-ns","joker.core/repeat","joker.core/repeatedly","joker.core/replace","joker.core/require","joker.core/requiring-resolve","joker.core/reset!","joker.core/reset-meta!","joker.core/reset-vals!","joker.core/resolve","joker.core/rest","joker.core/reverse","joker.core/reversible?","joker.core/rseq","joker.core/run!","joker.core/second","joker.core/select-keys","joker.core/seq","joker.core/seq?","joker.core/seqable?","joker.core/sequence","joker.core/sequential?","joker.core/set","joker.core/set?","joker.core/shuffle","joker.core/simple-ident?","joker.core/simple-keyword?","joker.core/simple-symbol?","joker.core/slurp","joker.core/some","joker.core/some->","joker.core/some->>","joker.core/some-fn","joker.core/some?","joker.core/sort","joker.core/sort-by","joker.core/special-symbol?","joker.core/spit","joker.core/split-at","joker.core/split-with","joker.core/str","joker.core/string?","joker.core/subs","joker.core/subvec","joker.core/swap!","joker.core/swap-vals!","joker.core/symbol","joker.core/symbol?","joker.core/take","joker.core/take-last","joker.core/take-nth","joker.core/take-while","joker.core/test","joker.core/the-ns","joker.core/time","joker.core/trampoline","joker.core/tree-seq","joker.core/true?","joker.core/type","joker.core/unsigned-bit-shift-right","joker.core/update","joker.core/update-in","joker.core/use","joker.core/val","joker.core/vals","joker.core/var-get","joker.core/var-set","joker.core/var?","joker.core/vary-meta","joker.core/vec","joker.core/vector","joker.core/vector?","joker.core/when","joker.core/when-first","joker.core/when-let","joker.core/when-not","joker.core/when-some","joker.core/while","joker.core/with-bindings","joker.core/with-bindings*","joker.core/with-in-str","joker.core/with-meta","joker.core/with-out-str","joker.core/with-redefs","joker.core/with-redefs-fn","joker.core/xml-seq","joker.core/zero?","joker.core/zipmap","joker.crypto/hmac","joker.crypto/md5","joker.crypto/sha1","joker.crypto/sha224","joker.crypto/sha256","joker.crypto/sha384","joker.crypto/sha512","joker.crypto/sha512-224","joker.crypto/sha512-256","joker.csv/csv-seq","joker.csv/write","joker.csv/write-string","joker.filepath/abs","joker.filepath/abs?","joker.filepath/base","joker.filepath/clean","joker.filepath/dir","joker.filepath/eval-symlinks","joker.filepath/ext","joker.filepath/file-seq","joker.filepath/from-slash","joker.filepath/glob","joker.filepath/join","joker.filepath/list-separator","joker.filepath/matches?","joker.filepath/rel","joker.filepath/separator","joker.filepath/split","joker.filepath/split-list","joker.filepath/to-slash","joker.filepath/volume-name","joker.hex/decode-string","joker.hex/encode-string","joker.hiccup/html","joker.hiccup/raw-string","joker.html/escape","joker.html/unescape","joker.http/send","joker.http/start-file-server","joker.http/start-server","joker.io/close","joker.io/copy","joker.io/pipe","joker.json/json-seq","joker.json/read-string","joker.json/write-string","joker.markdown/convert-string","joker.math/abs","joker.math/ceil","joker.math/copy-sign","joker.math/cos","joker.math/cube-root","joker.math/dim","joker.math/e","joker.math/exp","joker.math/exp-2","joker.math/exp-minus-1","joker.math/floor","joker.math/hypot","joker.math/inf","joker.math/inf?","joker.math/ln-of-10","joker.math/ln-of-2","joker.math/log","joker.math/log-10","joker.math/log-10-of-e","joker.math/log-2","joker.math/log-2-of-e","joker.math/log-binary","joker.math/log-plus-1","joker.math/max-double","joker.math/modf","joker.math/nan","joker.math/nan?","joker.math/next-after","joker.math/phi","joker.math/pi","joker.math/pow","joker.math/pow-10","joker.math/precision","joker.math/round","joker.math/round-to-even","joker.math/set-precision","joker.math/sign-bit","joker.math/sin","joker.math/smallest-nonzero-double","joker.math/sqrt","joker.math/sqrt-of-2","joker.math/sqrt-of-e","joker.math/sqrt-of-phi","joker.math/sqrt-of-pi","joker.math/trunc","joker.os/SIGABRT","joker.os/SIGALRM","joker.os/SIGFPE","joker.os/SIGHUP","joker.os/SIGILL","joker.os/SIGINT","joker.os/SIGKILL","joker.os/SIGPIPE","joker.os/SIGQUIT","joker.os/SIGSEGV","joker.os/SIGTERM","joker.os/SIGTRAP","joker.os/args","joker.os/chdir","joker.os/chmod","joker.os/chown","joker.os/chtimes","joker.os/clearenv","joker.os/close","joker.os/create","joker.os/create-temp","joker.os/cwd","joker.os/egid","joker.os/env","joker.os/euid","joker.os/exec","joker.os/executable","joker.os/exists?","joker.os/exit","joker.os/expand-env","joker.os/get-env","joker.os/gid","joker.os/groups","joker.os/hostname","joker.os/kill","joker.os/lchown","joker.os/link","joker.os/ls","joker.os/lstat","joker.os/mkdir","joker.os/mkdir-all","joker.os/mkdir-temp","joker.os/open","joker.os/pagesize","joker.os/path-separator?","joker.os/pid","joker.os/ppid","joker.os/read-link","joker.os/remove","joker.os/remove-all","joker.os/rename","joker.os/set-env","joker.os/sh","joker.os/sh-from","joker.os/signal","joker.os/start","joker.os/stat","joker.os/symlink","joker.os/temp-dir","joker.os/truncate","joker.os/uid","joker.os/unset-env","joker.os/user-cache-dir","joker.os/user-config-dir","joker.os/user-home-dir","joker.pprint/print-table","joker.repl/apropos","joker.repl/dir","joker.repl/dir-fn","joker.repl/doc","joker.runtime/go-root","joker.runtime/go-version","joker.runtime/joker-version","joker.set/difference","joker.set/index","joker.set/intersection","joker.set/join","joker.set/map-invert","joker.set/project","joker.set/rename","joker.set/rename-keys","joker.set/select","joker.set/subset?","joker.set/superset?","joker.set/union","joker.strconv/atoi","joker.strconv/can-backquote?","joker.strconv/format-bool","joker.strconv/format-double","joker.strconv/format-int","joker.strconv/graphic?","joker.strconv/itoa","joker.strconv/parse-bool","joker.strconv/parse-double","joker.strconv/parse-int","joker.strconv/printable?","joker.strconv/quote","joker.strconv/quote-char","joker.strconv/quote-char-to-ascii","joker.strconv/quote-char-to-graphic","joker.strconv/quote-to-ascii","joker.strconv/quote-to-graphic","joker.strconv/unquote","joker.string/blank?","joker.string/capitalize","joker.string/ends-with?","joker.string/escape","joker.string/includes?","joker.string/index-of","joker.string/join","joker.string/last-index-of","joker.string/lower-case","joker.string/pad-left","joker.string/pad-right","joker.string/re-quote","joker.string/replace","joker.string/replace-first","joker.string/reverse","joker.string/split","joker.string/split-lines","joker.string/starts-with?","joker.string/trim","joker.string/trim-left","joker.string/trim-newline","joker.string/trim-right","joker.string/triml","joker.string/trimr","joker.string/upper-case","joker.template/apply-template","joker.template/do-template","joker.test/*initial-report-counters*","joker.test/*load-tests*","joker.test/*report-counters*","joker.test/*stack-trace-depth*","joker.test/*test-out*","joker.test/*testing-contexts*","joker.test/*testing-vars*","joker.test/are","joker.test/assert-any","joker.test/assert-expr","joker.test/assert-predicate","joker.test/compose-fixtures","joker.test/deftest","joker.test/deftest-","joker.test/do-report","joker.test/function?","joker.test/get-possibly-unbound-var","joker.test/inc-report-counter","joker.test/is","joker.test/join-fixtures","joker.test/report","joker.test/run-all-tests","joker.test/run-tests","joker.test/set-test","joker.test/successful?","joker.test/test-all-vars","joker.test/test-ns","joker.test/test-var","joker.test/test-vars","joker.test/testing","joker.test/testing-contexts-str","joker.test/testing-vars-str","joker.test/try-expr","joker.test/use-fixtures","joker.test/with-test","joker.test/with-test-out","joker.time/add","joker.time/add-date","joker.time/ansi-c","joker.time/format","joker.time/from-unix","joker.time/hour","joker.time/hours","joker.time/in-timezone","joker.time/kitchen","joker.time/microsecond","joker.time/millisecond","joker.time/minute","joker.time/minutes","joker.time/nanosecond","joker.time/now","joker.time/parse","joker.time/parse-duration","joker.time/rfc1123","joker.time/rfc1123-z","joker.time/rfc3339","joker.time/rfc3339-nano","joker.time/rfc822","joker.time/rfc822-z","joker.time/rfc850","joker.time/round","joker.time/ruby-date","joker.time/second","joker.time/seconds","joker.time/since","joker.time/sleep","joker.time/stamp","joker.time/stamp-micro","joker.time/stamp-milli","joker.time/stamp-nano","joker.time/string","joker.time/sub","joker.time/truncate","joker.time/unix","joker.time/unix-date","joker.time/until","joker.tools.cli/format-lines","joker.tools.cli/get-default-options","joker.tools.cli/make-summary-part","joker.tools.cli/parse-opts","joker.tools.cli/summarize","joker.url/path-escape","joker.url/path-unescape","joker.url/query-escape","joker.url/query-unescape","joker.uuid/new","joker.walk/keywordize-keys","joker.walk/macroexpand-all","joker.walk/postwalk","joker.walk/postwalk-demo","joker.walk/postwalk-replace","joker.walk/prewalk","joker.walk/prewalk-demo","joker.walk/prewalk-replace","joker.walk/stringify-keys","joker.walk/walk","joker.yaml/read-string","joker.yaml/write-string"];
+const terms = ["joker.base64/decode-string","joker.base64/encode-string","joker.better-cond/cond","joker.better-cond/if-let","joker.better-cond/if-some","joker.better-cond/when-let","joker.better-cond/when-some","joker.bolt/by-prefix","joker.bolt/close","joker.bolt/create-bucket","joker.bolt/create-bucket-if-not-exists","joker.bolt/delete","joker.bolt/delete-bucket","joker.bolt/get","joker.bolt/next-sequence","joker.bolt/open","joker.bolt/put","joker.core/*","joker.core/*'","joker.core/*1","joker.core/*2","joker.core/*3","joker.core/*assert*","joker.core/*command-line-args*","joker.core/*e","joker.core/*err*","joker.core/*file*","joker.core/*flush-on-newline*","joker.core/*in*","joker.core/*joker-version*","joker.core/*linter-config*","joker.core/*linter-mode*","joker.core/*main-file*","joker.core/*ns*","joker.core/*out*","joker.core/*print-readably*","joker.core/+","joker.core/+'","joker.core/-","joker.core/-'","joker.core/->","joker.core/->>","joker.core//","joker.core/<","joker.core/","joker.core/>!","joker.core/>=","joker.core/alias","joker.core/all-ns","joker.core/alter-meta!","joker.core/and","joker.core/any?","joker.core/apply","joker.core/array-map","joker.core/as->","joker.core/assert","joker.core/assoc","joker.core/assoc-in","joker.core/associative?","joker.core/atom","joker.core/bigfloat","joker.core/bigfloat?","joker.core/bigint","joker.core/binding","joker.core/bit-and","joker.core/bit-and-not","joker.core/bit-clear","joker.core/bit-flip","joker.core/bit-not","joker.core/bit-or","joker.core/bit-set","joker.core/bit-shift-left","joker.core/bit-shift-right","joker.core/bit-test","joker.core/bit-xor","joker.core/boolean","joker.core/boolean?","joker.core/bound?","joker.core/bounded-count","joker.core/butlast","joker.core/callable?","joker.core/case","joker.core/cast","joker.core/chan","joker.core/char","joker.core/char?","joker.core/chunked-seq?","joker.core/class","joker.core/close!","joker.core/coll?","joker.core/comment","joker.core/comp","joker.core/compare","joker.core/complement","joker.core/concat","joker.core/cond","joker.core/cond->","joker.core/cond->>","joker.core/condp","joker.core/conj","joker.core/cons","joker.core/constantly","joker.core/contains?","joker.core/count","joker.core/counted?","joker.core/create-ns","joker.core/cycle","joker.core/dec","joker.core/dec'","joker.core/declare","joker.core/dedupe","joker.core/default-data-readers","joker.core/defmacro","joker.core/defmethod","joker.core/defmulti","joker.core/defn","joker.core/defn-","joker.core/defonce","joker.core/delay","joker.core/delay?","joker.core/denominator","joker.core/deref","joker.core/disj","joker.core/dissoc","joker.core/distinct","joker.core/distinct?","joker.core/doall","joker.core/dorun","joker.core/doseq","joker.core/dotimes","joker.core/doto","joker.core/double","joker.core/double?","joker.core/drop","joker.core/drop-last","joker.core/drop-while","joker.core/empty","joker.core/empty?","joker.core/eval","joker.core/even?","joker.core/every-pred","joker.core/every?","joker.core/ex-cause","joker.core/ex-data","joker.core/ex-info","joker.core/ex-message","joker.core/exit","joker.core/false?","joker.core/ffirst","joker.core/filter","joker.core/filterv","joker.core/find","joker.core/find-ns","joker.core/find-var","joker.core/first","joker.core/flatten","joker.core/float?","joker.core/flush","joker.core/fn","joker.core/fn?","joker.core/fnext","joker.core/fnil","joker.core/for","joker.core/force","joker.core/format","joker.core/frequencies","joker.core/gensym","joker.core/get","joker.core/get-in","joker.core/get-method","joker.core/go","joker.core/group-by","joker.core/hash","joker.core/hash-map","joker.core/hash-set","joker.core/ident?","joker.core/identical?","joker.core/identity","joker.core/if-let","joker.core/if-not","joker.core/if-some","joker.core/in-ns","joker.core/inc","joker.core/inc'","joker.core/indexed?","joker.core/instance?","joker.core/int","joker.core/int?","joker.core/integer?","joker.core/interleave","joker.core/intern","joker.core/interpose","joker.core/into","joker.core/iterate","joker.core/joker-version","joker.core/juxt","joker.core/keep","joker.core/keep-indexed","joker.core/key","joker.core/keys","joker.core/keyword","joker.core/keyword?","joker.core/last","joker.core/lazy-cat","joker.core/lazy-seq","joker.core/let","joker.core/letfn","joker.core/line-seq","joker.core/list","joker.core/list*","joker.core/list?","joker.core/load","joker.core/load-file","joker.core/load-string","joker.core/loaded-libs","joker.core/loop","joker.core/macroexpand","joker.core/macroexpand-1","joker.core/map","joker.core/map-indexed","joker.core/map?","joker.core/mapcat","joker.core/mapv","joker.core/max","joker.core/max-key","joker.core/memoize","joker.core/merge","joker.core/merge-with","joker.core/meta","joker.core/methods","joker.core/min","joker.core/min-key","joker.core/mod","joker.core/name","joker.core/namespace","joker.core/nat-int?","joker.core/neg-int?","joker.core/neg?","joker.core/newline","joker.core/next","joker.core/nfirst","joker.core/nil?","joker.core/nnext","joker.core/not","joker.core/not-any?","joker.core/not-empty","joker.core/not-every?","joker.core/not=","joker.core/ns","joker.core/ns-aliases","joker.core/ns-interns","joker.core/ns-map","joker.core/ns-name","joker.core/ns-publics","joker.core/ns-refers","joker.core/ns-resolve","joker.core/ns-sources","joker.core/ns-unalias","joker.core/ns-unmap","joker.core/nth","joker.core/nthnext","joker.core/nthrest","joker.core/num","joker.core/number?","joker.core/numerator","joker.core/odd?","joker.core/or","joker.core/partial","joker.core/partition","joker.core/partition-all","joker.core/partition-by","joker.core/peek","joker.core/pop","joker.core/pos-int?","joker.core/pos?","joker.core/pprint","joker.core/pr","joker.core/pr-err","joker.core/pr-str","joker.core/prefer-method","joker.core/prefers","joker.core/print","joker.core/print-err","joker.core/print-str","joker.core/printf","joker.core/println","joker.core/println-err","joker.core/println-str","joker.core/prn","joker.core/prn-err","joker.core/prn-str","joker.core/qualified-ident?","joker.core/qualified-keyword?","joker.core/qualified-symbol?","joker.core/quot","joker.core/rand","joker.core/rand-int","joker.core/rand-nth","joker.core/random-sample","joker.core/range","joker.core/ratio?","joker.core/rational?","joker.core/re-find","joker.core/re-matches","joker.core/re-pattern","joker.core/re-seq","joker.core/read","joker.core/read-line","joker.core/read-string","joker.core/realized?","joker.core/reduce","joker.core/reduce-kv","joker.core/reductions","joker.core/refer","joker.core/refer-clojure","joker.core/rem","joker.core/remove","joker.core/remove-all-methods","joker.core/remove-method","joker.core/remove-ns","joker.core/repeat","joker.core/repeatedly","joker.core/replace","joker.core/require","joker.core/requiring-resolve","joker.core/reset!","joker.core/reset-meta!","joker.core/reset-vals!","joker.core/resolve","joker.core/rest","joker.core/reverse","joker.core/reversible?","joker.core/rseq","joker.core/run!","joker.core/second","joker.core/select-keys","joker.core/seq","joker.core/seq?","joker.core/seqable?","joker.core/sequence","joker.core/sequential?","joker.core/set","joker.core/set?","joker.core/shuffle","joker.core/simple-ident?","joker.core/simple-keyword?","joker.core/simple-symbol?","joker.core/slurp","joker.core/some","joker.core/some->","joker.core/some->>","joker.core/some-fn","joker.core/some?","joker.core/sort","joker.core/sort-by","joker.core/special-symbol?","joker.core/spit","joker.core/split-at","joker.core/split-with","joker.core/str","joker.core/string?","joker.core/subs","joker.core/subvec","joker.core/swap!","joker.core/swap-vals!","joker.core/symbol","joker.core/symbol?","joker.core/take","joker.core/take-last","joker.core/take-nth","joker.core/take-while","joker.core/test","joker.core/the-ns","joker.core/time","joker.core/trampoline","joker.core/tree-seq","joker.core/true?","joker.core/type","joker.core/unsigned-bit-shift-right","joker.core/update","joker.core/update-in","joker.core/update-keys","joker.core/update-vals","joker.core/use","joker.core/val","joker.core/vals","joker.core/var-get","joker.core/var-set","joker.core/var?","joker.core/vary-meta","joker.core/vec","joker.core/vector","joker.core/vector?","joker.core/when","joker.core/when-first","joker.core/when-let","joker.core/when-not","joker.core/when-some","joker.core/while","joker.core/with-bindings","joker.core/with-bindings*","joker.core/with-in-str","joker.core/with-meta","joker.core/with-out-str","joker.core/with-redefs","joker.core/with-redefs-fn","joker.core/xml-seq","joker.core/zero?","joker.core/zipmap","joker.crypto/hmac","joker.crypto/md5","joker.crypto/sha1","joker.crypto/sha224","joker.crypto/sha256","joker.crypto/sha384","joker.crypto/sha512","joker.crypto/sha512-224","joker.crypto/sha512-256","joker.csv/csv-seq","joker.csv/write","joker.csv/write-string","joker.filepath/abs","joker.filepath/abs?","joker.filepath/base","joker.filepath/clean","joker.filepath/dir","joker.filepath/eval-symlinks","joker.filepath/ext","joker.filepath/file-seq","joker.filepath/from-slash","joker.filepath/glob","joker.filepath/join","joker.filepath/list-separator","joker.filepath/matches?","joker.filepath/rel","joker.filepath/separator","joker.filepath/split","joker.filepath/split-list","joker.filepath/to-slash","joker.filepath/volume-name","joker.hex/decode-string","joker.hex/encode-string","joker.hiccup/html","joker.hiccup/raw-string","joker.html/escape","joker.html/unescape","joker.http/send","joker.http/start-file-server","joker.http/start-server","joker.io/close","joker.io/copy","joker.io/pipe","joker.json/json-seq","joker.json/read-string","joker.json/write-string","joker.markdown/convert-string","joker.math/abs","joker.math/ceil","joker.math/copy-sign","joker.math/cos","joker.math/cube-root","joker.math/dim","joker.math/e","joker.math/exp","joker.math/exp-2","joker.math/exp-minus-1","joker.math/floor","joker.math/hypot","joker.math/inf","joker.math/inf?","joker.math/ln-of-10","joker.math/ln-of-2","joker.math/log","joker.math/log-10","joker.math/log-10-of-e","joker.math/log-2","joker.math/log-2-of-e","joker.math/log-binary","joker.math/log-plus-1","joker.math/max-double","joker.math/modf","joker.math/nan","joker.math/nan?","joker.math/next-after","joker.math/phi","joker.math/pi","joker.math/pow","joker.math/pow-10","joker.math/precision","joker.math/round","joker.math/round-to-even","joker.math/set-precision","joker.math/sign-bit","joker.math/sin","joker.math/smallest-nonzero-double","joker.math/sqrt","joker.math/sqrt-of-2","joker.math/sqrt-of-e","joker.math/sqrt-of-phi","joker.math/sqrt-of-pi","joker.math/trunc","joker.os/SIGABRT","joker.os/SIGALRM","joker.os/SIGFPE","joker.os/SIGHUP","joker.os/SIGILL","joker.os/SIGINT","joker.os/SIGKILL","joker.os/SIGPIPE","joker.os/SIGQUIT","joker.os/SIGSEGV","joker.os/SIGTERM","joker.os/SIGTRAP","joker.os/args","joker.os/chdir","joker.os/chmod","joker.os/chown","joker.os/chtimes","joker.os/clearenv","joker.os/close","joker.os/create","joker.os/create-temp","joker.os/cwd","joker.os/egid","joker.os/env","joker.os/euid","joker.os/exec","joker.os/executable","joker.os/exists?","joker.os/exit","joker.os/expand-env","joker.os/get-env","joker.os/gid","joker.os/groups","joker.os/hostname","joker.os/kill","joker.os/lchown","joker.os/link","joker.os/ls","joker.os/lstat","joker.os/mkdir","joker.os/mkdir-all","joker.os/mkdir-temp","joker.os/open","joker.os/pagesize","joker.os/path-separator?","joker.os/pid","joker.os/ppid","joker.os/read-link","joker.os/remove","joker.os/remove-all","joker.os/rename","joker.os/set-env","joker.os/sh","joker.os/sh-from","joker.os/signal","joker.os/start","joker.os/stat","joker.os/symlink","joker.os/temp-dir","joker.os/truncate","joker.os/uid","joker.os/unset-env","joker.os/user-cache-dir","joker.os/user-config-dir","joker.os/user-home-dir","joker.pprint/print-table","joker.repl/apropos","joker.repl/dir","joker.repl/dir-fn","joker.repl/doc","joker.runtime/go-root","joker.runtime/go-version","joker.runtime/joker-version","joker.set/difference","joker.set/index","joker.set/intersection","joker.set/join","joker.set/map-invert","joker.set/project","joker.set/rename","joker.set/rename-keys","joker.set/select","joker.set/subset?","joker.set/superset?","joker.set/union","joker.strconv/atoi","joker.strconv/can-backquote?","joker.strconv/format-bool","joker.strconv/format-double","joker.strconv/format-int","joker.strconv/graphic?","joker.strconv/itoa","joker.strconv/parse-bool","joker.strconv/parse-double","joker.strconv/parse-int","joker.strconv/printable?","joker.strconv/quote","joker.strconv/quote-char","joker.strconv/quote-char-to-ascii","joker.strconv/quote-char-to-graphic","joker.strconv/quote-to-ascii","joker.strconv/quote-to-graphic","joker.strconv/unquote","joker.string/blank?","joker.string/capitalize","joker.string/ends-with?","joker.string/escape","joker.string/includes?","joker.string/index-of","joker.string/join","joker.string/last-index-of","joker.string/lower-case","joker.string/pad-left","joker.string/pad-right","joker.string/re-quote","joker.string/replace","joker.string/replace-first","joker.string/reverse","joker.string/split","joker.string/split-lines","joker.string/starts-with?","joker.string/trim","joker.string/trim-left","joker.string/trim-newline","joker.string/trim-right","joker.string/triml","joker.string/trimr","joker.string/upper-case","joker.template/apply-template","joker.template/do-template","joker.test/*initial-report-counters*","joker.test/*load-tests*","joker.test/*report-counters*","joker.test/*stack-trace-depth*","joker.test/*test-out*","joker.test/*testing-contexts*","joker.test/*testing-vars*","joker.test/are","joker.test/assert-any","joker.test/assert-expr","joker.test/assert-predicate","joker.test/compose-fixtures","joker.test/deftest","joker.test/deftest-","joker.test/do-report","joker.test/function?","joker.test/get-possibly-unbound-var","joker.test/inc-report-counter","joker.test/is","joker.test/join-fixtures","joker.test/report","joker.test/run-all-tests","joker.test/run-tests","joker.test/set-test","joker.test/successful?","joker.test/test-all-vars","joker.test/test-ns","joker.test/test-var","joker.test/test-vars","joker.test/testing","joker.test/testing-contexts-str","joker.test/testing-vars-str","joker.test/try-expr","joker.test/use-fixtures","joker.test/with-test","joker.test/with-test-out","joker.time/add","joker.time/add-date","joker.time/ansi-c","joker.time/format","joker.time/from-unix","joker.time/hour","joker.time/hours","joker.time/in-timezone","joker.time/kitchen","joker.time/microsecond","joker.time/millisecond","joker.time/minute","joker.time/minutes","joker.time/nanosecond","joker.time/now","joker.time/parse","joker.time/parse-duration","joker.time/rfc1123","joker.time/rfc1123-z","joker.time/rfc3339","joker.time/rfc3339-nano","joker.time/rfc822","joker.time/rfc822-z","joker.time/rfc850","joker.time/round","joker.time/ruby-date","joker.time/second","joker.time/seconds","joker.time/since","joker.time/sleep","joker.time/stamp","joker.time/stamp-micro","joker.time/stamp-milli","joker.time/stamp-nano","joker.time/string","joker.time/sub","joker.time/truncate","joker.time/unix","joker.time/unix-date","joker.time/until","joker.tools.cli/format-lines","joker.tools.cli/get-default-options","joker.tools.cli/make-summary-part","joker.tools.cli/parse-opts","joker.tools.cli/summarize","joker.url/path-escape","joker.url/path-unescape","joker.url/query-escape","joker.url/query-unescape","joker.uuid/new","joker.walk/keywordize-keys","joker.walk/macroexpand-all","joker.walk/postwalk","joker.walk/postwalk-demo","joker.walk/postwalk-replace","joker.walk/prewalk","joker.walk/prewalk-demo","joker.walk/prewalk-replace","joker.walk/stringify-keys","joker.walk/walk","joker.yaml/read-string","joker.yaml/write-string"];
const els = document.querySelectorAll('a.types');
els.forEach(el => el.addEventListener('click', toggleTypes));