| SourceOperationsSumTOut, TMat Method |
Similar to
AggregateTOut1, TOut2, TMat(SourceTOut1, TMat, TOut2, FuncTOut2, TOut1, TOut2) but uses first element as zero element.
Applies the given function
reduce towards its current and next value,
yielding the next current value.
If the stream is empty (i.e. completes before signaling any elements),
the sum stage will fail its downstream with a
NoSuchElementException,
which is semantically in-line with that standard library collections do in such situations.
Emits when upstream completes
Backpressures when downstream backpressures
Completes when upstream completes
Cancels when downstream cancels
Namespace:
Akka.Streams.Dsl
Assembly:
Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax public static Source<TOut, TMat> Sum<TOut, TMat>(
this Source<TOut, TMat> flow,
Func<TOut, TOut, TOut> reduce
)
[<ExtensionAttribute>]
static member Sum :
flow : Source<'TOut, 'TMat> *
reduce : Func<'TOut, 'TOut, 'TOut> -> Source<'TOut, 'TMat>
Parameters
- flow
- Type: Akka.Streams.DslSourceTOut, TMat
TBD - reduce
- Type: SystemFuncTOut, TOut, TOut
TBD
Type Parameters
- TOut
- TBD
- TMat
- TBD
Return Value
Type:
SourceTOut,
TMatTBD
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
SourceTOut,
TMat. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also