
On 3 January 2017 at 00:08, Sergey Vinokurov
The complete code with my attempt is in the attachment.
Thanks a lot for your work, Sergey. Your suggested solution contains many useful elements. I am still not quite satisfied, however, as your solution does not let me convert the following: sampleEnv :: Map String Blah sampleEnv = M.fromList [ ("first", BlahF "first" 5 [YadaF "second"]) , ("second", BlahF "second" 3 [YadaF "first"]) ] (the point here is that the "tie knots" in the thread subject means that we end up with potentially cyclic values)
information on Fix type I'd recommend to read on recursion schemes/F-algebras, e.g. https://github.com/willtim/recursion-schemes/raw/master/slides-final.pdf.
In retrospect this indeed sounds like the right solution, thanks for the pointer.