| SubFlowOperationsSumTOut, TMat, TClosed Method |
Similar to
AggregateTOut1, TOut2, TMat, TClosed(SubFlowTOut1, TMat, TClosed, 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.129 (1.2.3.129)
Syntax public static SubFlow<TOut, TMat, TClosed> Sum<TOut, TMat, TClosed>(
this SubFlow<TOut, TMat, TClosed> flow,
Func<TOut, TOut, TOut> reduce
)
[<ExtensionAttribute>]
static member Sum :
flow : SubFlow<'TOut, 'TMat, 'TClosed> *
reduce : Func<'TOut, 'TOut, 'TOut> -> SubFlow<'TOut, 'TMat, 'TClosed>
Parameters
- flow
- Type: Akka.Streams.DslSubFlowTOut, TMat, TClosed
TBD - reduce
- Type: SystemFuncTOut, TOut, TOut
TBD
Type Parameters
- TOut
- TBD
- TMat
- TBD
- TClosed
- TBD
Return Value
Type:
SubFlowTOut,
TMat,
TClosedTBD
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
SubFlowTOut,
TMat,
TClosed. 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