Skip to content

Commit d1f24b3

Browse files
committed
avoid andThen indirection in F1 map and contramap
1 parent d2bd8cb commit d1f24b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/fj/F1Functions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,11 +670,11 @@ public static <A, B> ArrayList<B> mapJ(final F<A, B> f, final ArrayList<A> as) {
670670
}
671671

672672
public static <A, B, C> F<A, C> map(F<A, B> target, F<B, C> f) {
673-
return andThen(target, f);
673+
return o(f, target);
674674
}
675675

676676
public static <A, B, C> F<C, B> contramap(F<A, B> target, F<C, A> f) {
677-
return andThen(f, target);
677+
return o(target, f);
678678
}
679679

680680
/**

0 commit comments

Comments
 (0)