Skip to content

Commit 5756b62

Browse files
committed
Cleanup zipWith
1 parent cd0de7e commit 5756b62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/main/java/fj/control/Trampoline.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,11 @@ public <B, C> Trampoline<C> zipWith(final Trampoline<B> b, final F2<A, B, C> f)
339339
for (final P1<Trampoline<B>> y : eb.left()) {
340340
return suspend(P1.bind(x, y, new F2<Trampoline<A>, Trampoline<B>, Trampoline<C>>() {
341341
public Trampoline<C> f(final Trampoline<A> ta, final Trampoline<B> tb) {
342-
return ta.bind(tb, new F2<A, B, C>() {
343-
public C f(final A a, final B b) {
344-
return f.f(a, b);
342+
return suspend(new P1<Trampoline<C>>() {
343+
public Trampoline<C> _1() {
344+
return ta.zipWith(tb, f);
345345
}
346-
}.curry());
346+
});
347347
}
348348
}.curry()));
349349
}

0 commit comments

Comments
 (0)