Hi, quick question about the implementation of var...
# coroutines
d
Hi, quick question about the implementation of various monads in Kategory using continuations. From what I remember the last time I looked into it, Kotlin doesn't support delimited continuations, meaning (amongst other things) that you're not supposed to be able to call the same continuation twice. It looks like an implementation of the List monad using continuations would have to do this (since
bind
might conceivably send multiple values to the next expression); it also seems as if there are ways to hack Kotlin's continuation objects using reflection to enable them to be called repeatedly. Does anyone know if this is what Kategory is doing? While I admire the hack involved in bringing monads to Kotlin via continuations, I also strongly suspect it's quite a nasty hack. Can anyone comment on this, particularly with respect to maintainability (e.g. does it depend on an internal implementation detail that might change in the future)?