net.corda.client.fxutils / foldToObservableValue

# foldToObservableValue

`fun <A, B> <ERROR CLASS><A>.foldToObservableValue(initial: B, folderFun: (A, B) -> B): ObservableValue<B>`

foldToObservableValue takes an rx.Observable stream and creates an ObservableValue out of it.

### Parameters

`initial` - The initial value of the returned observable.
`folderFun` - The transformation function to be called on the observable value when a new element is emitted on the stream.