From d3188078c13dd25daf01d0ea6f2cb4f991f2c2f1 Mon Sep 17 00:00:00 2001
From: Gustavo Leon <1261319+gusty@users.noreply.github.com>
Date: Fri, 6 Jun 2025 09:04:35 +0200
Subject: [PATCH] + Operators for map2 and map3
---
src/FSharpPlus/Operators.fs | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/FSharpPlus/Operators.fs b/src/FSharpPlus/Operators.fs
index deaecd1d2..05d0f7dc0 100644
--- a/src/FSharpPlus/Operators.fs
+++ b/src/FSharpPlus/Operators.fs
@@ -256,6 +256,34 @@ module Operators =
/// Applicative
let inline map3 (f: 'T->'U->'V->'W) (x: '``ZipApplicative<'T>``) (y: '``ZipApplicative<'U>``) (z: '``ZipApplicative<'V>``) : '``ZipApplicative<'W>`` = Map3.Invoke f x y z
+ ///
+ /// Applies 2 lifted arguments to a non-lifted function with pointwise and/or parallel semantics.
+ /// Operator version of 'map2'.
+ ///
+ /// Applicative
+ let inline (<<||) (f: 'T->'U->'V) (x: '``ZipApplicative<'T>``, y: '``ZipApplicative<'U>``) : '``ZipApplicative<'V>`` = Map2.Invoke f x y
+
+ ///
+ /// Applies 2 lifted arguments to a non-lifted function with pointwise and/or parallel semantics.
+ /// Operator version of 'map2' but with arguments flipped.
+ ///
+ /// Applicative
+ let inline (||>>) (x: '``ZipApplicative<'T>``, y: '``ZipApplicative<'U>``) (f: 'T->'U->'V) : '``ZipApplicative<'V>`` = Map2.Invoke f x y
+
+ ///
+ /// Applies 3 lifted arguments to a non-lifted function with pointwise and/or parallel semantics.
+ /// Operator version of 'map3'.
+ ///
+ /// Applicative
+ let inline (<<|||) (f: 'T->'U->'V->'W) (x: '``ZipApplicative<'T>``, y: '``ZipApplicative<'U>``, z: '``ZipApplicative<'V>``) : '``ZipApplicative<'W>`` = Map3.Invoke f x y z
+
+ ///
+ /// Applies 3 lifted arguments to a non-lifted function with pointwise and/or parallel semantics.
+ /// Operator version of 'map3' but with arguments flipped.
+ ///
+ /// Applicative
+ let inline (|||>>) (x: '``ZipApplicative<'T>``, y: '``ZipApplicative<'U>``, z: '``ZipApplicative<'V>``) (f: 'T->'U->'V->'W) : '``ZipApplicative<'W>`` = Map3.Invoke f x y z
+
// Monad -----------------------------------------------------------