predis.util

counting-disj

(counting-disj s ks)
Similar to disj, but counts the number of elements removed
Returns tuple of [new-set num-items-removed]

counting-dissoc

(counting-dissoc m ks)
Similar to dissoc, but counts the number of elements removed
Returns tuple of [new-map num-items-removed]

counting-union

(counting-union s vs)
Similar to clojure.set/union, but counts the number of elements added
Returns tuple of [new-set num-items-added]

reduce-right

(reduce-right f init coll)

remove-all

(remove-all xs v)
Remove all occurrencess of v from xs, returning
a tuple of [new-list num-items-removed]

remove-first-n

(remove-first-n xs n v)
Remove the first n occurrences of v from xs, returning
a tuple of [new-list num-items-removed]

remove-last-n

(remove-last-n xs n v)
Remove the last n occurrences of v from xs, returning
a tuple of [new-list num-items-removed]

values-at

(values-at m ks)
Similar to (comp vals select-keys), but includes nil for missing keys
Ex:
  (values-at {:foo 1} [:foo :bar])
  [1 nil]

vec-wrap

(vec-wrap v-or-vs)