getify / monio

The most powerful IO monad implementation in JS, possibly in any language!
http://monio.run
MIT License
1.05k stars 58 forks source link

Free Monad #23

Closed MalQaniss closed 2 years ago

MalQaniss commented 2 years ago

Do you have any plans of adding Free Monad in the future?

getify commented 2 years ago

I'm basically aware of the Free monad, but not deeply cognizant of its applicability to Monio style code (with the IO, etc).

Can you give me an example where you'd like to use Free, perhaps alongside IO and/or the other monads in Monio?

If Monio had Free, what would that code look like in your preference?

If I can understand your intended uses, I can better speak to whether it makes sense to include in Monio. :)

MalQaniss commented 2 years ago

The only thing that comes to my mind now is for "trampolines", but that's a more general purpose tool I don't know if it would fit with Monio style. If I can find some others use-cases with IO, I will be sure to let you know.