effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Capture polymorphism

Open phischu opened this issue 2 years ago • 3 comments

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.

phischu avatar May 26 '23 09:05 phischu

/cc @e45lee ;)

b-studios avatar May 26 '23 09:05 b-studios

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? :)

b-studios avatar Aug 30 '23 07:08 b-studios