FSharpPlus icon indicating copy to clipboard operation
FSharpPlus copied to clipboard

+ Operators for map2 and map3

Open gusty opened this issue 4 months ago • 1 comments

  • In F# we have ||> which takes a tuple on the left side and applies each argument to a function on the right side
  • In F#+ we have |>> which takes a value inside a functor and maps with a function on the right side

Therefore it would make sense to have:

  • ||>> which takes a tuple with two functors and maps with a function on the right side. The is zip and map or simply map2.

Then it makes sense to add |||>> and the less idiomatic flipped versions <<|| and <<|||.

In the wild I've seen already cases where we have pipes with |>> and in the middle the need to switch to applicative (<!>, <*>) style, which breaks a bit the nice piping, In most of those cases these operators will be a good solution.

Open question about ||>>> and |||>>>.

gusty avatar Jun 06 '25 07:06 gusty