Skip to content

Commit a9770e5

Browse files
committed
Add missing .> and <. operators
1 parent 43e06c9 commit a9770e5

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/FSharpPlus/Operators.fs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,18 @@ module Operators =
268268
/// <category index="2">Applicative</category>
269269
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
270270

271+
/// <summary>
272+
/// Applies two applicatives left-to-right in a non-sequential way, discarding the value of the first argument.
273+
/// </summary>
274+
/// <category index="2">Applicative</category>
275+
let inline (.>) (x: '``ZipApplicative<'T>``) (y: '``ZipApplicative<'U>``) : '``ZipApplicative<'U>`` = ((fun (_: 'T) (k: 'U) -> k) <!> x : '``ZipApplicative<'U->'U>``) <.> y
276+
277+
/// <summary>
278+
/// Applies two applicatives left-to-right in a non-sequential way, discarding the value of the second argument.
279+
/// </summary>
280+
/// <category index="2">Applicative</category>
281+
let inline (<.) (x: '``ZipApplicative<'U>``) (y: '``ZipApplicative<'T>``) : '``ZipApplicative<'U>`` = ((fun (k: 'U) (_: 'T) -> k ) <!> x : '``ZipApplicative<'T->'U>``) <.> y
282+
271283
/// <summary>
272284
/// Applies 2 lifted arguments to a non-lifted function with pointwise and/or parallel semantics.
273285
/// Operator version of 'map2'.

0 commit comments

Comments
 (0)