Skip to content

Commit

Permalink
Use alignWith in alignMergeWith
Browse files Browse the repository at this point in the history
`alignWith` is usually overridden for efficiency
  • Loading branch information
joroKr21 committed Nov 14, 2024
1 parent 7a30dc2 commit 89deb4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/Align.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ trait Align[F[_]] extends Serializable {
* }}}
*/
def alignMergeWith[A](fa1: F[A], fa2: F[A])(f: (A, A) => A): F[A] =
functor.map(align(fa1, fa2))(_.mergeWith(f))
alignWith(fa1, fa2)(_.mergeWith(f))

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

0 comments on commit 89deb4c

Please sign in to comment.