ham-fisted.protocols
->init-val-fn
(->init-val-fn item)Returns the initial values for a parallel reduction. This function takes no arguments and returns the initial accumulator.
->merge-fn
(->merge-fn item)Returns the merge function for a parallel reduction. This function takes two accumulators and returns a or modified accumulator.
->rfn
(->rfn item)Returns the reduction function for a parallel reduction. This function takes two arguments, the accumulator and a value from the collection and returns a new or modified accumulator.
contained-datatype
(contained-datatype o)Datatype of contained datatype - may be nil if not a container
contains-fn
(contains-fn item)Return an efficient function for deciding if this set contains a single item.
datatype
(datatype o)Returns the datatype :int8, :int16, etc -- if known -- else the type can be assumed to be an object type. The return value may not be a keyword but it must be comparable with identical?
Finalize
protocol
Generic protocol for things that finalize results of reductions. Defaults to deref of instance of IDeref or identity.
PAdd
protocol
Define a function to mutably add items to a collection. This function must return the collection -- it must be useable in a reduce as the rf.
ParallelReducer
protocol
Parallel reducers are simple a single object that you can pass into preduce as opposed to 3 separate functions.
ParallelReduction
protocol
Protocol to define a parallel reduction in a collection-specific pathway. Specializations are in impl as that is where the parallelization routines are found.
preduce
(preduce coll init-val-fn rfn merge-fn options)Container-specific parallelized reduction. Reductions must respect the pool passed in via the options.
SetOps
protocol
Simple protocol for set operations to make them uniformly extensible to new objects.
simplified-contained-datatype
(simplified-contained-datatype o)Exactly :int64 :float64 :object or nil