+str - Changes the signature of Source.expand to be curried, to guide type inference.

This commit is contained in:
Viktor Klang 2014-11-08 00:08:36 +01:00
parent d60d5bc849
commit fd21e61f6a
4 changed files with 10 additions and 10 deletions

View file

@ -369,8 +369,8 @@ class Source[+Out](delegate: scaladsl.Source[Out]) {
* state.
*/
def expand[S, U](seed: japi.Function[Out, S], extrapolate: japi.Function[S, akka.japi.Pair[U, S]]): javadsl.Source[U] =
new Source(delegate.expand(seed.apply, (s: S) {
val p = extrapolate.apply(s)
new Source(delegate.expand(seed(_))(s {
val p = extrapolate(s)
(p.first, p.second)
}))