claro.data.ops

assoc

(assoc value k v)

Assoc the given value into the given resolvable once it was resolved to a map.

assoc-in

(assoc-in value ks v)

Assoc the given value into the given resolvable, once the value at the given path was resolved to a map.

drop

(drop n value)

Drop first n elements of the given resolvable.

first

(first value)

Get the first element of the given resolvable.

fmap

(fmap f & values)

Apply the given function to the given, potentially partially resolved values.

fmap!

(fmap! f & values)

Apply the given function to the given values once they are fully resolved.

fmap-on

(fmap-on predicate f & values)

Apply the given function to the given, potentially partially resolved values once the given predicate is fulfilled. Note that the predicate has to have an arity matching the number of values.

get

(get value k)(get value k default)

get-in

(get-in value ks)(get-in value ks default)

map

(map f & sq)

Iterate the given function over every element of the given, potentially partially resolved values. The collection type might not be maintained.

nth

(nth value n)

Get the nth element of the given resolvable.

on

(on value predicate f & args)

Wrap the given value with a processing function that gets called the moment the given value is neither a Resolvable nor wrapped, plus fulfills the given predicate.

select-keys

(select-keys value ks)

Wrap the given value to select only the given keys once they are available.

take

(take n value)

Get first n elements of the given resolvable.

then

(then value f & args)

Wrap the given value with a processing function that gets called the moment the given value is neither a Resolvable nor wrapped.

then!

(then! value f & args)

Wrap the given value with a processing function that gets called once the value has been fully resolved.

Only use this for guaranteed finite expansion!

update

(update value k f & args)

Wrap the given value to perform an update on a key once it’s available.

update-in

(update-in value [k & rst] f & args)

Wrap the given value to perform an update on a nested key once it’s available.