Create a gist now

Instantly share code, notes, and snippets.

public static class CompositionSources<B>
{
private CompositionSources(){ }
public interface Partial<B>
{
CompletableFuture<Outcome<B>> apply(CompletableFuture<Outcome<B>> b);
}
public interface MergingStage<B, V>{
Partial<B> by(BiFunction<Outcome<B>, Outcome<V>, Outcome<B>> f);
}
public <V> MergingStage<B, V> value(CompletableFuture<Outcome<V>> value){
return f -> builder
-> builder.thenCombine(value, (b, v) -> f.apply(b, v)
.dependingOn(b)
.dependingOn(v));
}
public static <B> CompositionSources<B> stickedTo(Class<B> clazz)
{
return new CompositionSources<>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment