net.corda.client.fxutils / foldToObservableMap

# foldToObservableMap

`fun <A, B, K, C> <ERROR CLASS><A>.foldToObservableMap(initialAccumulator: C, folderFun: (A, C, ObservableMap<K, B>) -> C): ObservableMap<K, out B>`

foldToObservableMap takes an rx.Observable stream and creates an ObservableMap out of it, while maintaining an accumulator.

### Parameters

`initialAccumulator` - The initial value of the accumulator.
`folderFun` - The transformation function to be called on the observable map when a new element is emitted on the stream, which should modify the map as needed.