Liking cljdoc? Tell your friends :D

yang.lang


and->clj

(and->)
(and-> x)
(and-> x & [f & fs])
source

append-if-absentclj

(append-if-absent v xs)
(append-if-absent v xs delim)
source

bbuffer->strclj

(bbuffer->str bb)
source

bytes->strclj

(bytes->str bs)
(bytes->str bs enc)
source

camel-to-dashclj

(camel-to-dash k)
source

capitalizeclj

(capitalize xs)
source

cconjclj

(cconj xs item & {:keys [size]})

circular conj adds an item into a collection, droping the last element in case a collection count is greater than a :size. (def l '(10 11 12 13 14 15 16 17)) (take 5 (iterate #(cconj % (rand-int 10) :size 10) l)) => ((10 11 12 13 14 15 16 17) (3 10 11 12 13 14 15 16 17) (9 3 10 11 12 13 14 15 16 17) (5 9 3 10 11 12 13 14 15 16) (2 5 9 3 10 11 12 13 14 15))

circular conj
adds an item into a collection, droping the last element
in case a collection count is greater than a :size.
(def l '(10 11 12 13 14 15 16 17))
(take 5 (iterate #(cconj % (rand-int 10) :size 10) l))
=>
((10 11 12 13 14 15 16 17)
 (3 10 11 12 13 14 15 16 17)
 (9 3 10 11 12 13 14 15 16 17)
 (5 9 3 10 11 12 13 14 15 16)
 (2 5 9 3 10 11 12 13 14 15))
sourceraw docstring

csv->vecclj

(csv->vec csv)
source

dash-keysclj

(dash-keys m)
(dash-keys from m)
source

dash-to-camelclj

(dash-to-camel xs)
source

deep-merge-withclj

(deep-merge-with f & maps)

like merge-with, but merges maps recursively, appling the given fn only when there's a non-map at a particular level. (deepmerge + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4} {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}}) -> {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}

like merge-with, but merges maps recursively, appling the given fn
only when there's a non-map at a particular level.
(deepmerge + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4}
             {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}})
-> {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}
sourceraw docstring

dissoc-inclj

(dissoc-in m [k & ks :as keys])

from https://github.com/clojure/core.incubator

dissociates an entry from a nested associative structure returning a new nested structure. keys is a sequence of keys. Any empty maps that result will not be present in the new structure.

from https://github.com/clojure/core.incubator

dissociates an entry from a nested associative structure returning a new
nested structure. keys is a sequence of keys. Any empty maps that result
will not be present in the new structure.
sourceraw docstring

edn-resourceclj

(edn-resource path)
source

extract-key-nsclj

(extract-key-ns m kns)

=> (extract-key-ns {:a/one :a-one :a/two :a-two :b/one :b-one :b/two :b-two} :a)

{:a {:one :a-one :two :a-two}}

=> (extract-key-ns {:a/one :a-one :a/two :a-two :b/one :b-one :b/two :b-two}
                :a)

{:a {:one :a-one
     :two :a-two}}
sourceraw docstring

fmkclj

(fmk m f)

apply f to each key k of map m

apply f to each key k of map m
sourceraw docstring

fmvclj

(fmv m f)

apply f to each value v of map m

apply f to each value v of map m
sourceraw docstring

freq-mapclj

(freq-map m by)
source

future->completable-futureclj

(future->completable-future fut pool)
source

group-by-firstclj

(group-by-first m)

takes a seq of 2 element tuples and groups them by the first (key) element. (group-by-first [[1 2][1 4][2 3][2 7]]) {1 (4 2), 2 (7 3)}

takes a seq of 2 element tuples
and groups them by the first (key) element.
 (group-by-first [[1 2][1 4][2 3][2 7]])
   {1 (4 2), 2 (7 3)}
sourceraw docstring

group-by-nsclj

(group-by-ns m)

=> (group-by-ns {:a/one :a-one :b/one :b-one :a/two :a-two :b/two :b-two})

{:a {:one :a-one, :two :a-two} :b {:one :b-one, :two :b-two}}

=> (group-by-ns {:a/one :a-one :b/one :b-one :a/two :a-two :b/two :b-two})

{:a {:one :a-one, :two :a-two}
 :b {:one :b-one, :two :b-two}}
sourceraw docstring

gunzip-ednclj

(gunzip-edn bs)
source

gzip-ednclj

(gzip-edn edn)
source

instance-methodclj

(instance-method obj method-name)
(instance-method obj method-name args)
source

jcoll?clj

(jcoll? x)
source

joinclj

(join xs1 xs2 on)
source

lower-caseclj

(lower-case s)
source

merge-mapsclj

(merge-maps & m)
source

none?clj

(none? v)
source

one-if-noneclj

(one-if-none n)
source

parse-doubleclj

(parse-double d)
source

parse-longclj

(parse-long l)
source

parse-numberclj

(parse-number n)
source

plusclj

(plus & xs)
source

pos-number?clj

(pos-number? n)
source

positive?clj

(positive? xs)
source

prettyclj

(pretty & args)
source

private-fieldclj

(private-field obj field)
source

private-methodclj

(private-method obj method & args)
source

props->mapclj

(props->map props)

java.util.Properties to map

java.util.Properties to map
sourceraw docstring

ranged-randclj

(ranged-rand start end)
source

remove-deepclj

(remove-deep key-set data)
source

remove-emptyclj

(remove-empty m)

=> (remove-empty {:a nil :b "" :c [] :d 42}) {:d 42}

=> (remove-empty {:a nil :b "" :c [] :d 42})
{:d 42}
sourceraw docstring

remove-key-nsclj

(remove-key-ns m)
(remove-key-ns m kns)
source

replace-in-keysclj

(replace-in-keys m from to)
source

replace-in-kwclj

(replace-in-kw kw from to)

=> (replace-in-kw :foo-bar-baz "bar" "zoo") :foo-zoo-baz

=> (replace-in-kw :foo-bar-baz "bar" "zoo")
:foo-zoo-baz
sourceraw docstring

replace-lineclj

(replace-line path from to)
source

rfmkclj

(rfmk m f)

recursively apply f to each key k of map m

recursively apply f to each key k of map m
sourceraw docstring

rm-sortclj

(rm-sort m)

reverse map sort (by key)

reverse map sort (by key)
sourceraw docstring

seq->in-paramsclj

(seq->in-params xs)
source

show-threadsclj

(show-threads)
from: https://twitter.com/chrishouser/status/1306000820580876288
sourceraw docstring

slurp-resourceclj

(slurp-resource path)
source

squuidclj

(squuid)
tasty sequential UUIDs
from: https://github.com/clojure-cookbook/clojure-cookbook/blob/1b3754a7f4aab51cc9b254ea102870e7ce478aa0/01_primitive-data/1-24_uuids.asciidoc
sourceraw docstring

static-methodclj

(static-method clazz method params)
source

str->bytesclj

(str->bytes xs)
(str->bytes xs enc)
source

str->ednclj

(str->edn xs)
source

str->uuidclj

(str->uuid s)
source

str-valclj

(str-val v)
source

str=clj

(str= s v)

case insensitive

case insensitive
sourceraw docstring

suuid?clj

(suuid? s)
source

sval?clj

(sval? v)
source

then-applyclj

(then-apply cf f)
source

then-composeclj

(then-compose cf f)
source

to-alpha-numclj

(to-alpha-num xs)
source

to-doubleclj

(to-double n)
source

to-longclj

(to-long n)
source

trimclj

(trim s)
source

underscore-keysclj

(underscore-keys m)
(underscore-keys from m)
source

upper-caseclj

(upper-case s)
source

uuidclj

(uuid)
source

valueclj

(value v)
source

value?clj

(value? v)
source

zero-uuidclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close