O'Reilly logo
  • Philippe Derome thinks this is interesting:

def zip[A, B](f1: Fx[A], f2: Fx[B]): Fx[(A, B)] =
ap[B, (A, B)](ap[A, B => (A, B)](Right { (a: A) => (b: B) => (a, b) })(f1))(f2)

From

Cover of Mastering Functional Programming

Note

yes there are nested calls to ap here to implement zip, read slowly enough to understand.