Type representation for generator functions
See original GitHub issueexecuting this in the repl
S.prop('a', {a : function*(){return 12}} )
results in
TypeError: Type-variable constraint violation
prop :: Accessible a => String -> a -> b
^
1
1) function* (){return 12} ::
Since there is no type of which all the above values are members, the type-variable constraint has been violated.
It used to work before, now it’s breaking.
Is there a type representation for generator functions? (is this even the issue? i’m not completely sure)
I’m currently using the latest version of ES6
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Generators - Python Wiki
Generator functions allow you to declare a function that behaves like an iterator, i.e. it can be used in a for loop.
Read more >Generating function - Wikipedia
There are various types of generating functions, including ordinary generating functions, exponential generating functions, Lambert series, Bell series, ...
Read more >Iterators and generators - JavaScript - MDN Web Docs
When called, generator functions do not initially execute their code. Instead, they return a special type of iterator, called a Generator.
Read more >Understanding Generators in JavaScript | DigitalOcean
In this article, we'll cover how to create generator functions, how to iterate over Generator objects, the difference between yield and ...
Read more >Python Generators (With Examples) - Programiz
In this tutorial, you'll learn how to create iterations easily using Python generators, how it is different from iterators and normal functions, and...
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
My pleasure! This is my first public contribution on github and i’m glad it’s to Sanctuary 😃