kactoos-jvm / nnl.rocks.kactoos.scalar / Reduced
class Reduced<out T : Any> : Scalar<T>
Reduce iterable via BiFunc.
Reduced(
{ head, tail -> head + tail },
IterableOf({ 1 }, { 2 }, { 3 }, { 4 })
).invoke()
There is no thread-safety guarantee.
T - KScalar type
function - Folding function
items - The scalars
Since 0.3
| Name | Summary |
|---|---|
| <init> | Reduced(function: BiFunc<T, T, T>, items: Iterable<KScalar<T>>)Reduced(function: KBiFunc<T, T, T>, items: Iterable<KScalar<T>>)Reduce iterable via BiFunc. |
| Name | Summary |
|---|---|
| invoke | fun invoke(): TGet value of this Scalar |