Hello,
I'm looking for something roughly with the semantics of scalaz Task.
- It should be lazy, meaning construction of the thing should not lead to its evaluation / submission to a thread pool
- It should be able to handle errors, meaning I can map and bind over the thing, and if upstream has failed, I get the failed thing.
I tried looking at Promise, but either it doesn't cut it or I'm using it wrong. Also I browsed around the archives but couldn't find anything.
For completeness, my usecase here is to interpret DB<A> in a target structure F which evaluates asynchronously, and lazily, so that methods transforming and composing F's are just descriptions of computation and therefore pure. This, of course, breaks with CompletableFuture, ListenableFuture and friends.
Regards, Dimitar