initTo

fun <R> ReductionType.initTo(default: R, self: R): R

Selects the initial value for a reduction based on whether the local value is included.

Return

self if this is IncludingSelf, or default if ExcludingSelf.

Parameters

default

the value to use if the local value is excluded.

self

the value to use if the local value is included.