Think about typed do-notation
See original GitHub issueI have removed @pipeline
in 0.14
release.
It had lots of problems:
- It was not working properly with
Failure
types: #90 - It had problems with unwrapping complex values like
IOResult
andFutureResult
- It had problems unwrapping containers of different types (you were not allowed to unwrap both
Maybe
andResult
in the same@pipeline
- It was encouraging imperative code in a functional codebase
I would love to have some solution instead! But, no ideas about how it should work or look like. So, any ideas are welcome.
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (10 by maintainers)
Top Results From Across the Web
Connotation and Denotation
Denotation is when you mean what you say, literally. Connotation is created when you mean something else, something that might be initially hidden....
Read more >What Is Denotation? Definition of Denotation, With Examples ...
Denotation is the objective meaning of a word. The term comes from the Latin word “denotationem,” meaning “indication.” The denotation of a ...
Read more >Denotation & Connotation in Type - Study.com
Denotation in Type The first step is determining what your message will actually say, the definition of the words. Often, this will come...
Read more >Denotation Examples and Meaning | YourDictionary
Learning about denotation starts by understanding its meaning. Find the definition along with several examples across literature and even zodiac signs here.
Read more >connotation vs. denotation : Choose Your Words
Denotation means the literal meaning of a word or name. Although Paris might make you think of romance, its denotation is simply "the...
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
A couple of thoughts here:
do(...)
should be wrapped in IO. 3 is a pure value, butx + y
happens in the impure IO context. Once you enter IO, you cannot get back; you just have to keep working in IO.wrap
? Is it just a way to turn a monadic type into a generator? I wonder if there’s a way to bake generator functionality into the monadic types themselves so you could avoid thewrap
function…@sobolevn i ended up going the generator route as it resulted in the cleanest code while still looking like python. all the other implementations i ran into were fairly gross looking and convoluted to force the code to do something it wasn’t meant for (like the decorator with dozens of yields). the for comprehension was was able to do a form of ‘lifting’ for free, cleanly.
i actually use that pattern in code all the time now. most people just don’t understand the power of the for comprehension.
personally i think typed python is a step backwards so i haven’t messed with it. python is extremely powerful functionally without types.