Liking cljdoc? Tell your friends :D

com.jolygon.poly-map.api-0.keys

This ns is mostly just for documentation and for providing an alias.

Defines standard keyword keys used in the implementations ('impls') map of a persistent PolyMap to override default map behaviors.

Each var defined here holds the actual namespaced keyword as its value (e.g., get_k evaluates to ::get_k in this ns). The documentation for the override is attached as metadata to the var.

Override functions associated with these keywords receive the following arguments:

  • this The PolyMap instance itself.
  • m The underlying persistent data collection.
  • impls The persistent implementations map itself.
  • metadata The persistent metadata map of the PolyMap instance. Followed by operation-specific arguments like k, v, f, init, etc.

Override functions are generally expected to return the final result that the corresponding Clojure interface method would return (e.g., a new PolyMap instance for assoc/dissoc, a value for get, a boolean for containsKey?). When returning a new PolyMap instance, ensure it's properly constructed, often using com.jolygon.poly-map.api-0/make-poly-map or similar internal constructors if needed, preserving implementations and metadata appropriately.

This ns is mostly just for documentation and for providing an alias.

Defines standard keyword keys used in the implementations ('impls') map
of a persistent PolyMap to override default map behaviors.

Each var defined here holds the actual namespaced keyword as its value
(e.g., `get_k` evaluates to `::get_k` in this ns). The documentation for
the override is attached as metadata to the var.

Override functions associated with these keywords receive the following
arguments:
- this       The PolyMap instance itself.
- m       The underlying persistent data collection.
- impls      The persistent implementations map itself.
- metadata   The persistent metadata map of the PolyMap instance.
Followed by operation-specific arguments like k, v, f, init, etc.

Override functions are generally expected to return the final result
that the corresponding Clojure interface method would return (e.g., a new
PolyMap instance for assoc/dissoc, a value for get, a boolean for containsKey?).
When returning a new PolyMap instance, ensure it's properly constructed,
often using `com.jolygon.poly-map.api-0/make-poly-map` or similar internal
constructors if needed, preserving implementations and metadata appropriately.
raw docstring

assoc_k_vclj/s

(assoc_k_v this m impls metadata k v)

Overrides clojure.lang.Associative/assoc. Expected fn signature: (fn [this m impls metadata k v] ...) Should return: The new persistent PolyMap instance with the key/value associated.

Overrides `clojure.lang.Associative/assoc`.
Expected fn signature: `(fn [this m impls metadata k v] ...)`
Should return: The new persistent PolyMap instance with the key/value associated.
sourceraw docstring

assocEx_k_vclj/s

(assocEx_k_v this m impls metadata k v)

Overrides clojure.lang.IPersistentMap/assocEx. Note: Maps typically treat assocEx like assoc (no exception on existing key). Expected fn signature: (fn [this m impls metadata k v] ...) Should return: The new persistent PolyMap instance with the key/value associated.

Overrides `clojure.lang.IPersistentMap/assocEx`.
Note: Maps typically treat assocEx like assoc (no exception on existing key).
Expected fn signature: `(fn [this m impls metadata k v] ...)`
Should return: The new persistent PolyMap instance with the key/value associated.
sourceraw docstring

asTransientclj/s

(asTransient this m impls metadata)

Overrides clojure.lang.IEditableCollection/asTransient (CLJ) or IEditableCollection.-as-transient (CLJS). Expected fn signature: (fn [this m impls metadata] ...) Should return: A new TransientPolyMap instance.

Overrides `clojure.lang.IEditableCollection/asTransient` (CLJ) or `IEditableCollection.-as-transient` (CLJS).
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: A new `TransientPolyMap` instance.
sourceraw docstring

clearclj/s

(CLJ only) Overrides java.util.Map/clear. Unsupported on immutable maps.

(CLJ only) Overrides `java.util.Map/clear`. Unsupported on immutable maps.
sourceraw docstring

coll-reduce_fclj/s

(coll-reduce_f this m impls metadata f)

Overrides clojure.core.protocols/coll-reduce (1-arg arity: (reduce f coll)). Expected fn signature: (fn [this m impls metadata f] ...) where f is the reducing function. Should return: The final reduced value.

Overrides `clojure.core.protocols/coll-reduce` (1-arg arity: `(reduce f coll)`).
Expected fn signature: `(fn [this m impls metadata f] ...)` where `f` is the reducing function.
Should return: The final reduced value.
sourceraw docstring

coll-reduce_f_initclj/s

(coll-reduce_f_init this m impls metadata f init)

Overrides clojure.core.protocols/coll-reduce (2-arg arity: (reduce f init coll)). Expected fn signature: (fn [this m impls metadata f init] ...) where f is reducing fn, init is initial value. Should return: The final reduced value.

Overrides `clojure.core.protocols/coll-reduce` (2-arg arity: `(reduce f init coll)`).
Expected fn signature: `(fn [this m impls metadata f init] ...)` where `f` is reducing fn, `init` is initial value.
Should return: The final reduced value.
sourceraw docstring

cons_vclj/s

(cons_v this m impls metadata v)

Overrides clojure.lang.IPersistentCollection/cons. Expected fn signature: (fn [this m impls metadata v] ...) where v is the value to add (e.g., a MapEntry). Should return: The new persistent PolyMap instance with the item added.

Overrides `clojure.lang.IPersistentCollection/cons`.
Expected fn signature: `(fn [this m impls metadata v] ...)` where `v` is the value to add (e.g., a MapEntry).
Should return: The new persistent PolyMap instance with the item added.
sourceraw docstring

constructclj/s

(construct this m impls metadata)

Internal function called when creating/updating PolyMap instances. Applies ::pm/construct hook if present. Returns a PolyMap.

Internal function called when creating/updating PolyMap instances.
Applies ::pm/construct hook if present.
Returns a PolyMap.
sourceraw docstring

containsKey_kclj/s

(containsKey_k this m impls metadata k)

Overrides clojure.lang.Associative/containsKey. Expected fn signature: (fn [this m impls metadata k] ...) Should return: Boolean indicating if the key k is present.

Overrides `clojure.lang.Associative/containsKey`.
Expected fn signature: `(fn [this m impls metadata k] ...)`
Should return: Boolean indicating if the key `k` is present.
sourceraw docstring

containsValue_vclj/s

(CLJ only) Overrides java.util.Map/containsValue. Often inefficient.

(CLJ only) Overrides `java.util.Map/containsValue`. Often inefficient.
sourceraw docstring

countclj/s

(count this m impls metadata)

Overrides clojure.lang.Counted/count. Expected fn signature: (fn [this m impls metadata] ...) Should return: The integer count of items in the map.

Overrides `clojure.lang.Counted/count`.
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: The integer count of items in the map.
sourceraw docstring

emptyclj/s

(empty this m impls metadata)

Overrides clojure.lang.IPersistentCollection/empty. Expected fn signature: (fn [this m impls metadata] ...) Should return: A new, empty PolyMap instance (typically keeping the same impls map and nil metadata).

Overrides `clojure.lang.IPersistentCollection/empty`.
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: A new, empty PolyMap instance (typically keeping the same impls map and nil metadata).
sourceraw docstring

entryAt_kclj/s

(entryAt_k this m impls metadata k)

Overrides clojure.lang.Associative/entryAt. Expected fn signature: (fn [this m impls metadata k] ...) Should return: A clojure.lang.MapEntry for the key k, or nil.

Overrides `clojure.lang.Associative/entryAt`.
Expected fn signature: `(fn [this m impls metadata k] ...)`
Should return: A `clojure.lang.MapEntry` for the key `k`, or nil.
sourceraw docstring

entrySetclj/s

(CLJ only) Overrides java.util.Map/entrySet.

(CLJ only) Overrides `java.util.Map/entrySet`.
sourceraw docstring

equiv_otherclj/s

(equiv_other this m impls metadata other)

Overrides clojure.lang.IHashEq/equiv (CLJ) or IEquiv.-equiv (CLJS). Note: Default PolyMap equiv delegates to underlying value. Overriding this changes equality semantics. Be cautious. Expected fn signature: (fn [this m impls metadata other] ...) where other is the object to compare against. Should return: Boolean indicating equivalence.

Overrides `clojure.lang.IHashEq/equiv` (CLJ) or `IEquiv.-equiv` (CLJS).
Note: Default PolyMap equiv delegates to underlying value. Overriding this changes equality semantics. Be cautious.
Expected fn signature: `(fn [this m impls metadata other] ...)` where `other` is the object to compare against.
Should return: Boolean indicating equivalence.
sourceraw docstring

get_kclj/s

(get_k this m impls metadata k)

Overrides clojure.lang.ILookup/valAt (get with 1 key argument). Expected fn signature: (fn [this m impls metadata k] ...) Should return: The value associated with k, or nil if not found.

Overrides `clojure.lang.ILookup/valAt` (get with 1 key argument).
Expected fn signature: `(fn [this m impls metadata k] ...)`
Should return: The value associated with `k`, or nil if not found.
sourceraw docstring

get_k_nfclj/s

(get_k_nf this m impls metadata k nf)

Overrides clojure.lang.ILookup/valAt (get with key and nf arguments). Expected fn signature: (fn [this m impls metadata k nf] ...) Should return: The value associated with k, or the nf value.

Overrides `clojure.lang.ILookup/valAt` (get with key and nf arguments).
Expected fn signature: `(fn [this m impls metadata k nf] ...)`
Should return: The value associated with `k`, or the `nf` value.
sourceraw docstring

handle-invokeclj/s

(handle-invoke this env impls metadata)
(handle-invoke this env impls metadata a1)
(handle-invoke this env impls metadata a1 a2)
(handle-invoke this env impls metadata a1 a2 a3)
(handle-invoke this env impls metadata a1 a2 a3 a4)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5 a6)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5 a6 a7)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5 a6 a7 a8)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5 a6 a7 a8 a9)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5 a6 a7 a8 a9 a10)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11)
(handle-invoke this env impls metadata a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12)
(handle-invoke this
               env
               impls
               metadata
               a1
               a2
               a3
               a4
               a5
               a6
               a7
               a8
               a9
               a10
               a11
               a12
               a13)
(handle-invoke this
               env
               impls
               metadata
               a1
               a2
               a3
               a4
               a5
               a6
               a7
               a8
               a9
               a10
               a11
               a12
               a13
               a14)
(handle-invoke this
               env
               impls
               metadata
               a1
               a2
               a3
               a4
               a5
               a6
               a7
               a8
               a9
               a10
               a11
               a12
               a13
               a14
               a15)
(handle-invoke this
               env
               impls
               metadata
               a1
               a2
               a3
               a4
               a5
               a6
               a7
               a8
               a9
               a10
               a11
               a12
               a13
               a14
               a15
               a16)
(handle-invoke this
               env
               impls
               metadata
               a1
               a2
               a3
               a4
               a5
               a6
               a7
               a8
               a9
               a10
               a11
               a12
               a13
               a14
               a15
               a16
               &
               rest-args)

Core IFn invocation handler for PolyMap instances. Checks for ::invoke-variadic in impls and calls it if present with exact arity arguments (0-20). Otherwise delegates to default-map-invoke with exact arity arguments. Uses apply only for arity > 20.

Core IFn invocation handler for PolyMap instances.
Checks for ::invoke-variadic in impls and calls it if present with exact
arity arguments (0-20). Otherwise delegates to default-map-invoke with
exact arity arguments. Uses apply only for arity > 20.
sourceraw docstring

hashCodeclj/s

(hashCode this m impls metadata)

Overrides Object/hashCode (CLJ) or IHash.-hash (CLJS). Note: Must be consistent with equiv_other if overridden. Default delegates to m. Expected fn signature: (fn [this m impls metadata] ...) Should return: An integer hash code.

Overrides `Object/hashCode` (CLJ) or `IHash.-hash` (CLJS).
Note: Must be consistent with `equiv_other` if overridden. Default delegates to m.
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: An integer hash code.
sourceraw docstring

invoke-variadicclj/s

(invoke-variadic this m impls metadata & args)

Overrides clojure.lang.IFn/invoke and applyTo. Called when the PolyMap is invoked as a function. Note: The default implementation handles arities 1 & 2 as map lookups. This override replaces ALL function call behavior. Expected fn signature: (fn [this m impls metadata & args] ...) Should return: The result of the function call.

Overrides `clojure.lang.IFn/invoke` and `applyTo`. Called when the PolyMap is invoked as a function.
Note: The default implementation handles arities 1 & 2 as map lookups.
This override replaces ALL function call behavior.
Expected fn signature: `(fn [this m impls metadata & args] ...)`
Should return: The result of the function call.
sourceraw docstring

IPolyAssociativeclj/sprotocol

Protocol for managing the impls map ('m') of a persistent PolyMap.

Protocol for managing the impls map ('m') of a persistent PolyMap.

-assoc-implclj/s

(-assoc-impl coll k v)

Associates impl k with function v in the impls map. Returns new PolyMap.

Associates impl k with function v in the impls map. Returns new PolyMap.

-contains-impl?clj/s

(-contains-impl? coll k)

Returns true if impl k exists in the impls map.

Returns true if impl k exists in the impls map.

-dissoc-implclj/s

(-dissoc-impl coll k)

Removes impl k from the impls map. Returns new PolyMap.

Removes impl k from the impls map. Returns new PolyMap.

-get-collclj/s

(-get-coll coll)

Returns the underlying persistent data collection ('m').

Returns the underlying persistent data collection ('m').

-get-implsclj/s

(-get-impls coll)

Returns the full persistent impls map.

Returns the full persistent impls map.

-implclj/s

(-impl coll k)

Returns the function associated with impl k, or nil.

Returns the function associated with impl k, or nil.

-set-implsclj/s

(-set-impls coll new-impls)

Replaces the entire impls map. Returns new PolyMap.

Replaces the entire impls map. Returns new PolyMap.
sourceraw docstring

isEmptyclj/s

(CLJ only) Overrides java.util.Map/isEmpty. See count or seq.

(CLJ only) Overrides `java.util.Map/isEmpty`. See `count` or `seq`.
sourceraw docstring

iteratorclj/s

(iterator this m impls metadata)

Overrides java.lang.Iterable/iterator (CLJ) or IIterable.-iterator (CLJS). Expected fn signature: (fn [this m impls metadata] ...) Should return: A relevant Iterator object over the map's entries.

Overrides `java.lang.Iterable/iterator` (CLJ) or `IIterable.-iterator` (CLJS).
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: A relevant Iterator object over the map's entries.
sourceraw docstring

keyIteratorclj/s

(keyIterator this m impls metadata)

Overrides clojure.lang.IMapIterable/keyIterator (CLJ only?). Note: Less commonly overridden than seq/reduce. Expected fn signature: (fn [this m impls metadata] ...) Should return: A java.util.Iterator over the map's keys.

Overrides `clojure.lang.IMapIterable/keyIterator` (CLJ only?).
Note: Less commonly overridden than seq/reduce.
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: A `java.util.Iterator` over the map's keys.
sourceraw docstring

keySetclj/s

(CLJ only) Overrides java.util.Map/keySet.

(CLJ only) Overrides `java.util.Map/keySet`.
sourceraw docstring

kv-reduce_f_initclj/s

(kv-reduce_f_init this m impls metadata f init)

Overrides clojure.lang.IKVReduce/kvreduce (CLJ) or cljs.core.protocols/IKVReduce.-kv-reduce (CLJS). Expected fn signature: (fn [this m impls metadata f init] ...) where f is (fn [acc k v] ...) reducing fn. Should return: The final reduced value.

Overrides `clojure.lang.IKVReduce/kvreduce` (CLJ) or `cljs.core.protocols/IKVReduce.-kv-reduce` (CLJS).
Expected fn signature: `(fn [this m impls metadata f init] ...)` where `f` is `(fn [acc k v] ...)` reducing fn.
Should return: The final reduced value.
sourceraw docstring

metaclj/s

(meta this m impls metadata)

Overrides clojure.lang.IObj/meta (CLJ) or IMeta.-meta (CLJS). Expected fn signature: (fn [this m impls metadata] ...) Should return: The metadata map associated with the PolyMap.

Overrides `clojure.lang.IObj/meta` (CLJ) or `IMeta.-meta` (CLJS).
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: The metadata map associated with the PolyMap.
sourceraw docstring

(print-method_writer this m impls metadata writer)

Overrides the print-method multimethod (CLJ) or IPrintWithWriter.-pr-writer protocol method (CLJS). Expected fn signature: (fn [this m impls metadata writer] ...) where writer is the output writer/stream. CLJS also receives opts. Should return: nil (CLJ) or the writer (CLJS). The function should perform writes to the writer directly.

Overrides the `print-method` multimethod (CLJ) or `IPrintWithWriter.-pr-writer` protocol method (CLJS).
Expected fn signature: `(fn [this m impls metadata writer] ...)` where `writer` is the output writer/stream. CLJS also receives `opts`.
Should return: `nil` (CLJ) or the writer (CLJS). The function should perform writes to the writer directly.
sourceraw docstring

put_k_vclj/s

(CLJ only) Overrides java.util.Map/put. Unsupported on immutable maps.

(CLJ only) Overrides `java.util.Map/put`. Unsupported on immutable maps.
sourceraw docstring

putAll_mapclj/s

(CLJ only) Overrides java.util.Map/putAll. Unsupported on immutable maps.

(CLJ only) Overrides `java.util.Map/putAll`. Unsupported on immutable maps.
sourceraw docstring

remove_kclj/s

(CLJ only) Overrides java.util.Map/remove. Unsupported on immutable maps.

(CLJ only) Overrides `java.util.Map/remove`. Unsupported on immutable maps.
sourceraw docstring

seqclj/s

(seq this m impls metadata)

Overrides clojure.lang.Seqable/seq. Expected fn signature: (fn [this m impls metadata] ...) Should return: A seq of the map's entries, or nil if empty.

Overrides `clojure.lang.Seqable/seq`.
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: A seq of the map's entries, or nil if empty.
sourceraw docstring

sizeclj/s

(CLJ only) Overrides java.util.Map/size. See count.

(CLJ only) Overrides `java.util.Map/size`. See `count`.
sourceraw docstring

toStringclj/s

(toString this m impls metadata)

Overrides Object/toString. Expected fn signature: (fn [this m impls metadata] ...) Should return: A string representation of the PolyMap.

Overrides `Object/toString`.
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: A string representation of the PolyMap.
sourceraw docstring

valIteratorclj/s

(valIterator this m impls metadata)

Overrides clojure.lang.IMapIterable/valIterator (CLJ only?). Note: Less commonly overridden than seq/reduce. Expected fn signature: (fn [this m impls metadata] ...) Should return: A java.util.Iterator over the map's values.

Overrides `clojure.lang.IMapIterable/valIterator` (CLJ only?).
Note: Less commonly overridden than seq/reduce.
Expected fn signature: `(fn [this m impls metadata] ...)`
Should return: A `java.util.Iterator` over the map's values.
sourceraw docstring

valuesclj/s

(CLJ only) Overrides java.util.Map/values.

(CLJ only) Overrides `java.util.Map/values`.
sourceraw docstring

withMeta_metaclj/s

(withMeta_meta this m impls metadata new-meta)

Overrides clojure.lang.IObj/withMeta (CLJ) or IWithMeta.-with-meta (CLJS). Expected fn signature: (fn [this m impls metadata new-meta] ...) where new-meta is the new metadata map. Should return: A new persistent PolyMap instance with the new metadata applied.

Overrides `clojure.lang.IObj/withMeta` (CLJ) or `IWithMeta.-with-meta` (CLJS).
Expected fn signature: `(fn [this m impls metadata new-meta] ...)` where `new-meta` is the new metadata map.
Should return: A new persistent PolyMap instance with the new metadata applied.
sourceraw docstring

without_kclj/s

(without_k this m impls metadata k)

Overrides clojure.lang.IPersistentMap/without (dissoc). Note: Core dissoc is variadic. This override receives only the first key k. Expected fn signature: (fn [this m impls metadata k] ...) Should return: The new persistent PolyMap instance with the key removed.

Overrides `clojure.lang.IPersistentMap/without` (dissoc).
Note: Core dissoc is variadic. This override receives only the first key `k`.
Expected fn signature: `(fn [this m impls metadata k] ...)`
Should return: The new persistent PolyMap instance with the key removed.
sourceraw docstring

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

× close