Closed johanhaleby closed 4 years ago
Maybe put this in "util-application-service" and include generic AS there as well.
Another function that would be good would be something that converts Function<Stream<T>, Stream<T>> functionThatCallsDomainModel
into a Function<List<T>, List<T>> functionThatCallsDomainModel
.
Create utilities that allow doing this:
We probably need two different
compose
methods, one for(List<CloudEvent>) -> List<CloudEvent>
and one for(Stream<CloudEvent>) -> Stream<CloudEvent>
(maybe call themcomposeList
andcomposeStream
?). Implementation may look something like this:The
partial
methods should also be tailored for having "right application" (usually partial application is from the left side).