From 89deb4c87fdea00c5a2fa97e981f714ccda72f59 Mon Sep 17 00:00:00 2001 From: Georgi Krastev Date: Thu, 14 Nov 2024 23:44:50 +0100 Subject: [PATCH] Use alignWith in alignMergeWith `alignWith` is usually overridden for efficiency --- core/src/main/scala/cats/Align.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/cats/Align.scala b/core/src/main/scala/cats/Align.scala index 9bdc4a7a69..0b871930cc 100644 --- a/core/src/main/scala/cats/Align.scala +++ b/core/src/main/scala/cats/Align.scala @@ -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.