Collection lookups, equality and hashing shared by database views. Work streams over the view; no materialization or mutable-view hash caching is needed.
Collection lookups, equality and hashing shared by database views. Work streams over the view; no materialization or mutable-view hash caching is needed.
(index-in-bounds? i size)True when i is an integer index inside a sequence of size elements.
Floats, nil and keywords are never in bounds. The engine counts negative
indices from the end, so every lookup checks this before coercing i and
reading.
True when `i` is an integer index inside a sequence of `size` elements. Floats, nil and keywords are never in bounds. The engine counts negative indices from the end, so every lookup checks this before coercing `i` and reading.
(indexed-invoke coll k)Single-argument invocation of a sequence view. Unlike get, it throws for
keys that are not indices, as Clojure vectors do.
Single-argument invocation of a sequence view. Unlike `get`, it throws for keys that are not indices, as Clojure vectors do.
(indexed-lookup coll k not-found)ILookup valAt for sequence views: the element at an in-bounds index, which
may be a stored nil, and not-found for every other key.
ILookup valAt for sequence views: the element at an in-bounds index, which may be a stored nil, and `not-found` for every other key.
(indexed-nth coll i)nth without a default for sequence views: the element at an in-bounds index, otherwise IndexOutOfBoundsException, as Clojure vectors and Java List.get do. Reads with a nil default because an in-range NONE slot represents a stored nil and may have no read cursor.
nth without a default for sequence views: the element at an in-bounds index, otherwise IndexOutOfBoundsException, as Clojure vectors and Java List.get do. Reads with a nil default because an in-range NONE slot represents a stored nil and may have no read cursor.
(list-view coll)Live, read-only List adapter for shared Java methods on sequence wrappers. AbstractList supplies bounds-checked sublists, bidirectional iterators and typed arrays. Forward iteration streams the wrapper's seq without copying.
Live, read-only List adapter for shared Java methods on sequence wrappers. AbstractList supplies bounds-checked sublists, bidirectional iterators and typed arrays. Forward iteration streams the wrapper's seq without copying.
(map-entry-set m)Returns a live, read-only java.util.Set view of map m's entries in the
map's seq order. Membership checks look the key up with entryAt and compare
the value with Java equality, as clojure.lang.APersistentMap does.
Returns a live, read-only java.util.Set view of map `m`'s entries in the map's seq order. Membership checks look the key up with entryAt and compare the value with Java equality, as clojure.lang.APersistentMap does.
(map-equiv? a b)Compares map a with java.util.Map b using Clojure value equivalence.
Persistent maps must also implement MapEquivalence. Requires matching counts
and keys, distinguishing absent keys from keys whose values are nil.
Compares map `a` with java.util.Map `b` using Clojure value equivalence. Persistent maps must also implement MapEquivalence. Requires matching counts and keys, distinguishing absent keys from keys whose values are nil.
(map-hash coll)Returns the Java Map-style hashCode of coll: the sum of each entry's key
hashCode XOR value hashCode, with 32-bit overflow and no ordering dependence.
Returns the Java Map-style hashCode of `coll`: the sum of each entry's key hashCode XOR value hashCode, with 32-bit overflow and no ordering dependence.
(map-key-set m)Returns a live, read-only java.util.Set view of map m's keys, backed by
the map's own seq, count, and containsKey. Iteration follows the map's seq
order, so sorted maps yield ascending keys. Nothing is copied.
Returns a live, read-only java.util.Set view of map `m`'s keys, backed by the map's own seq, count, and containsKey. Iteration follows the map's seq order, so sorted maps yield ascending keys. Nothing is copied.
(map-values m)Returns a live, read-only java.util.Collection view of map m's values in
the map's seq order. Nothing is copied.
Returns a live, read-only java.util.Collection view of map `m`'s values in the map's seq order. Nothing is copied.
(ordered-hash coll)Returns the Java List-style hashCode of coll, combining element hashCodes
in sequence order with 32-bit overflow. Computes from current contents.
Returns the Java List-style hashCode of `coll`, combining element hashCodes in sequence order with 32-bit overflow. Computes from current contents.
(ordered-hasheq coll)Returns the order-sensitive Clojure hash of coll, compatible with native
lists and vectors. Computes from current contents without caching.
Returns the order-sensitive Clojure hash of `coll`, compatible with native lists and vectors. Computes from current contents without caching.
(sequence-equal? a b equiv?)Compares a element by element with sequential or java.util.List b.
Uses Clojure value equivalence when equiv? is true, Java equality otherwise.
Stops at the first mismatch or unequal length without materializing either sequence.
Compares `a` element by element with sequential or java.util.List `b`. Uses Clojure value equivalence when `equiv?` is true, Java equality otherwise. Stops at the first mismatch or unequal length without materializing either sequence.
(set-hash coll)Returns the Java Set-style hashCode of coll: the sum of member hashCodes,
with 32-bit overflow and no ordering dependence. Computes from current contents.
Returns the Java Set-style hashCode of `coll`: the sum of member hashCodes, with 32-bit overflow and no ordering dependence. Computes from current contents.
(unordered-hasheq coll)Returns the order-independent Clojure hash of coll, compatible with native
sets and maps. Maps contribute key-value entries; sets contribute members.
Computes from current contents without caching.
Returns the order-independent Clojure hash of `coll`, compatible with native sets and maps. Maps contribute key-value entries; sets contribute members. Computes from current contents without caching.
(unsupported-mutation!)Throws UnsupportedOperationException for Java collection mutation methods. Database views accept updates through their Clojure collection operations.
Throws UnsupportedOperationException for Java collection mutation methods. Database views accept updates through their Clojure collection operations.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |