question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Applicative operators

See original GitHub issue

This 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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
gustycommented, Jan 14, 2018

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

1reaction
gustycommented, Jan 10, 2018

I’m also inclined towards . now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found