Liking cljdoc? Tell your friends :D

pandect.target.srcdeps.pandect.potemkin.v0v4v5.potemkin.collections


AbstractMapclj

source

compile-ifcljmacro

(compile-if test then else)
source

def-derived-mapcljmacro

(def-derived-map name params & {:as m})

Allows a map type to be defined where key-value pairs may be derived from fields.

For instance, if we want to create a map which contains both upper and lower-case versions of a string without immediately instantiating both, we can do this:

(def-derived-map StringMap [^String s] :lower-case (.toLowerCase s) :upper-case (.toUpperCase s))

The resulting map will behave correctly if the defined keys are removed, shadowed, etc.

The above class will automatically create a constructor named '->StringMap'.

Allows a map type to be defined where key-value pairs may be derived from fields.

For instance, if we want to create a map which contains both upper and lower-case
versions of a string without immediately instantiating both, we can do this:

(def-derived-map StringMap [^String s]
  :lower-case (.toLowerCase s)
  :upper-case (.toUpperCase s))

The resulting map will behave correctly if the defined keys are removed, shadowed,
etc.

The above class will automatically create a constructor named '->StringMap'.
sourceraw docstring

def-map-typecljmacro

(def-map-type name params & body)

Like deftype, but must contain definitions for the following functions:

(get [this key default-value]) (assoc [this key value]) (dissoc [this key]) (keys [this]) (meta [this]) (with-meta [this meta])

All other necessary functions will be defined so that this behaves like a normal Clojure map. These can be overriden, if desired.

Like deftype, but must contain definitions for the following functions:

(get [this key default-value])
(assoc [this key value])
(dissoc [this key])
(keys [this])
(meta [this])
(with-meta [this meta])

All other necessary functions will be defined so that this behaves like a normal
Clojure map.  These can be overriden, if desired.
sourceraw docstring

PotemkinFnclj

source

PotemkinMapcljprotocol

assoc*clj

(assoc* m k v)

dissoc*clj

(dissoc* m k)

empty*clj

(empty* m)

get*clj

(get* m k default)

keys*clj

(keys* m)

meta*clj

(meta* o)

with-meta*clj

(with-meta* o mta)
source

PotemkinMetacljprotocol

meta-atomclj

(meta-atom _)

with-meta-atomclj

(with-meta-atom _ x)
source

reify-map-typecljmacro

(reify-map-type & body)

Like reify, but must contain definitions for the following functions:

(get [this key default-value]) (assoc [this key value]) (dissoc [this key]) (keys [this])

All other necessary functions will be defined so that this behaves like a normal Clojure map. These can be overriden, if desired.

Like reify, but must contain definitions for the following functions:

(get [this key default-value])
(assoc [this key value])
(dissoc [this key])
(keys [this])

All other necessary functions will be defined so that this behaves like a normal
Clojure map.  These can be overriden, if desired.
sourceraw docstring

throw-arityclj

(throw-arity actual)
source

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

× close