[OpenSCAD] Functions literals / higher order functions

Ronaldo Persiano rcmpersiano at gmail.com
Mon Nov 25 19:08:17 EST 2019

I can't see why the following generates a stack overflow:

function move(a, g) =
  function(x) g(x+a) ;

g1 = function(x) x;
g2 = move(0,g1);
g3 = move(0,g2);


If g3 is defined as g2 no error is reported.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191126/a8d4fde1/attachment.html>

More information about the Discuss mailing list