From 3eaa3c880ae8ca69279049758ff10318c6c39721 Mon Sep 17 00:00:00 2001 From: Gustavo Leon <1261319+gusty@users.noreply.github.com> Date: Thu, 25 Jan 2024 20:26:30 +0100 Subject: [PATCH] + "Deep map" pipe operators --- src/FSharpPlus/Operators.fs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/FSharpPlus/Operators.fs b/src/FSharpPlus/Operators.fs index 81a099789..b55e6ae99 100644 --- a/src/FSharpPlus/Operators.fs +++ b/src/FSharpPlus/Operators.fs @@ -143,6 +143,19 @@ module Operators = /// Functor let inline (|>>) (x: '``Functor<'T>``) (f: 'T->'U) : '``Functor<'U>`` = Map.Invoke f x + /// + /// Lifts a function into two Functors. + /// To be used in pipe-forward style expressions + /// + /// Functor + let inline (|>>>) (x: '``Functor1>``) (f: 'T -> 'U) : '``Functor1>`` = (Map.Invoke >> Map.Invoke) f x + + /// + /// Lifts a function into two Functors. + /// + /// Functor + let inline (<<<|) (f: 'T -> 'U) (x: '``Functor1>``) : '``Functor1`` = (Map.Invoke >> Map.Invoke) f x + /// /// Like map but ignoring the results. ///