3 ms·
But does Koka let you generalize over effects?
by puddingforears 5y ago
But does Koka let you generalize over effects?
- Quekid5 5y agoNot as far as I can tell, but it seems to let you supply handlers to discharge effects at any point. That should at least allow you to 'embed' any effect type in a more general effect type (but the 'embedding' itself would be hardcoded, so not 'first class'... I think.).
- gryn 5y agofrom reading it docs in the past, it seems to have polymorphism over effects. I don't know if that's what you mean by generalizing over effects.
- CornCobs 5y agoDisclaimer: only have dabbled in Koka slightly. Not very sure if this is what you were asking about but yes, you can write functions that are polymorphic in their effect. E.g. the map function takes a function that has some effect e and the map function itself has the same effect e