module type Computation = sig .. end
Description of a computation.
type input
The type of input values.
type key
The type of keys.
type value
The type of values.
type output
The type of output values.
val compare_keys : key -> key -> int
Ordering over keys.
val map : input ->
(key * value) list
map operation, turning an input value into a list of key/value
couples. The various calls to map
are done in parallel by pool
threads.
val combine : key ->
value ->
value -> value
combine operation, turning two values into one for a given key.
The calls to combine
are done sequentially by the main thread as
soon as several values are available for a given key.
val reduce : key ->
value ->
output -> output
reduce operation, folding over all key/value couple in order to
produce the final result.