I have been looking into the Free monad because I have read that a use case for it is to do logging in a side-effect free way.
I am attempting to do this in JavaScript with the Monet library.
However the documentation is lacking and I do not understand the Free monad well enough figure it out on my own(I have been trying).
I have looked into the Haskell implementation, but I do not read Haskell well and the methods do not appear to be named the same, so I am having trouble.
Any chance someone can give me a simple example of how the Free monad works in either JavaScript or pseudo code that matches the above library?
I feel like if I can see a complete example, I will understand better.
Here are the unit tests from the Monet library: https://github.com/monet/monet.js/blob/develop/test/free-spec.js
But they don't help me much (because they are tests).