Skip to content

Commit 89deb4c

Browse files
committed
Use alignWith in alignMergeWith
`alignWith` is usually overridden for efficiency
1 parent 7a30dc2 commit 89deb4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/cats/Align.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ trait Align[F[_]] extends Serializable {
8484
* }}}
8585
*/
8686
def alignMergeWith[A](fa1: F[A], fa2: F[A])(f: (A, A) => A): F[A] =
87-
functor.map(align(fa1, fa2))(_.mergeWith(f))
87+
alignWith(fa1, fa2)(_.mergeWith(f))
8888

8989
/**
9090
* Same as `align`, but forgets from the type that one of the two elements must be present.

0 commit comments

Comments
 (0)