James
11/17/2017, 4:17 PMfun <T> then(onSuccess: (TSuccess) -> Result<T, TFailure>): Result<T, TFailure>
I'm able to call it from Java as follows
result.then(this::nextStep) // this works with the below method signature
public Result<X, Y> nextStep(X value) {
...
}
But I can't seem to find a way to find a type that I can pass in. I've tried the following:
result.then(ifCondition(this::nextStep)) // this fails given the below signature of `ifCondition`
public Function<X, Result<X, Y>> ifCondition(Function<X, Result<X, Y>> block)
Any help would be greatly appreciated. 🙂