Liking cljdoc? Tell your friends :D

predis.util.range

Utilities for interpreting/normalizing indices for range commands, e.g. LRANGE, ZRANGE

Utilities for interpreting/normalizing indices for range commands,
e.g. LRANGE, ZRANGE
raw docstring

indices-forclj

(indices-for xs start stop)

Normalize user-specified indices into a range of positive indices It is up to the user to check for additional error cases as necessary

Normalize user-specified indices into a range of positive indices
It is up to the user to check for additional error cases as necessary
sourceraw docstring

normalized-start-idxclj

(normalized-start-idx xs start)

Given an start idx which may be negative (indicating offset from the end) or exceed the size of xs, return a normalized positive 0-based idx

Semantics for start differ from end - e.g. LRANGE specifies that start > last-idx = empty list

Given an start idx which may be negative (indicating offset from the end)
or exceed the size of xs, return a normalized positive 0-based idx

Semantics for start differ from end - e.g. LRANGE specifies that
start > last-idx = empty list
sourceraw docstring

normalized-stop-idxclj

(normalized-stop-idx xs stop)

Given a stop idx which may be negative (indicating offset from the end) or exceed the size of xs, return a normalized positive 0-based idx

Semantics for stop differ from start - e.g. LRANGE specifies that stop > last-idx = treat like last idx

Given a stop idx which may be negative (indicating offset from the end)
or exceed the size of xs, return a normalized positive 0-based idx

Semantics for stop differ from start - e.g. LRANGE specifies that
stop > last-idx = treat like last idx
sourceraw docstring

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

× close