Haskell: do
Scala: for
OCaml: let*
F#: let!
Elixir: with
What other monadic syntaxes and keywords are there?
Conversation
I’m partial to `let x <- e1; e2`
1
3
I was considering that but wasn't sure if it would be confusing to reuse `let`
1
1
Replying to
Yeah not sure. I think Conor McBride argues that do notation was a bit of a mistake, but can’t remember his reasons 🤔
There’s an issue I think that it often encourages sequential computation unnecessarily? A bit like async/await.
1
3
This is kind of where applicatives come in I think. I believe OCaml has `let+` for applicatives?
2
2
Show replies
I think the issue is if you have code in the ambient monad of the programming language (i.e. “pure” code) then it can’t seamlessly be used with the monadic sub-language code but let in the ambient monad is the same as bind.


