Skip to content

Commit 72b0259

Browse files
committed
+ lift3 for tuples
1 parent 2500644 commit 72b0259

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/FSharpPlus/Control/Applicative.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ type Lift3 =
129129
static member Lift3 (f, (x , y , z ), _mthd: Lift3) = List.lift3 f x y z
130130
static member Lift3 (f, (x , y , z ), _mthd: Lift3) = Array.lift3 f x y z
131131
static member Lift3 (f, (x: 'R -> 'T , y: 'R -> 'U , z: 'R -> 'V ), _mthd: Lift3) = fun a -> f (x a) (y a) (z a)
132+
static member inline Lift3 (f, ((a: 'Monoid, x: 'T) , (b: 'Monoid, y: 'U) , (c: 'Monoid, z: 'U) ), _mthd: Lift3) = Plus.Invoke (Plus.Invoke a b) c, f x y z
133+
static member inline Lift3 (f, (struct (a: 'Monoid, x: 'T), struct (b: 'Monoid, y: 'U), struct (c: 'Monoid, z: 'U)), _mthd: Lift3) = struct (Plus.Invoke (Plus.Invoke a b) c, f x y z)
132134
#if !FABLE_COMPILER
133135
static member Lift3 (f, (x: Task<'T> , y: Task<'U> , z: Task<'V> ), _mthd: Lift3) = Task.map3 f x y z
134136
#endif

0 commit comments

Comments
 (0)