Applicative operators
See original GitHub issueThis decision is in the roadmap to 1.0
We currently have applicative operators which are very convenient to write “formula with effects”:
let x = Some 4 |+| Some 6
let y = 4 +| tryParse "6"
We can extend this to many other operators, not just basic math:
|=|
|>|
|<|
But when using them with pure values they will become:
|=
|>
ops, this is the forward pipe
<|
… and this one the backwards
and if we add logic operators:
|&&|
||||
… this looks weird.
Maybe we can rename them to:
.+.
.-.
.>.
.=.
.||.
Any thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Haskell/Applicative functors
Like monads, applicative functors are functors with extra laws and operations; in fact, Applicative is an intermediate class between Functor and Monad ....
Read more >Control.Applicative - Hackage - Haskell.org
This module describes a structure intermediate between a functor and a monad (technically, a strong lax monoidal functor).
Read more >Functors, Applicative Functors and Monoids
In this section, we'll take a look at applicative functors, ... two applicative functors of strings just by inserting the appropriate applicative operators....
Read more >Applicative Functors
Applicative functors are the second step to understanding monads. They build on our knowledge of normal functors and gives us a little more...
Read more >Chapter 10: Applicative Functors - mostly-adequate-guide
A good use case for applicatives is when one has multiple functor arguments. They give us the ability to apply functions to arguments...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks everybody for your input. Based on comments and as far as I can tell switching to
.
prefix/suffix is the way to go.Closing as it is already implemented in https://github.com/gusty/FSharpPlus/commit/1a3a5122cced747187e0b5ea8629122bd3202c33
I’m also inclined towards
.
now.