net.corda.client.fxutils / javafx.collections.ObservableList / foldObservable

# foldObservable

`fun <A, B> ObservableList<out A>.foldObservable(initial: B, folderFunction: (B, A) -> B): ObservableValue<B>`

val people: ObservableList = (..) val concatenatedNames = people.foldObservable("", { names, person -> names + person.name }) val concatenatedNames2 = people.map(Person::name).fold("", String::plus)