On Saturday, December 16, 2017 at 9:27:28 PM UTC, Mark Hamburg wrote: > > One can return a partial function application and it looks just like any > other function, so in the general case, it can't be garbage collected. This > isn't special to JavaScript. In fact, JavaScript doesn't support partial > function application. What JavaScript, Elm, and pretty much any other > language that purports to be functional does support is capturing values > through closure creation and because those closures can be returned as > values, they need to be subject to garbage collection. >
Thanks for this explanation, I get it now. I will try and work out an example of how the mutually recursive functions can create a cyclic structure on the heap, based on this. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
