effekt
effekt copied to clipboard
Capture polymorphism
It would be great if we could abstract over capture sets on the type level:
type Coroutine[C, A] {
Done()
More(value: A, next: () => Coroutine[C, A] at C)
}
This way we could actually store first-class functions in data structures.
/cc @e45lee ;)
When implementing this, we should also consider #67 since we would need a general form of polymorphism and kind inference.
This is not the easiest task to start, but maybe @dvdvgt and/or @marvinborner are interested in taking up the challenge at some point? :)