3 ms·
I disagree completely that this is a 'functional subset' of C. I also don't know a lot about this stuff, so tear me up. A functional language isn't just one th
by jmilloy 14y ago
I disagree completely that this is a 'functional subset' of C. I also don't know a lot about this stuff, so tear me up.
A functional language isn't just one that doesn't use malloc/only uses the stack. It must actually not have state, and instead evaluate a single function down to the result. Here, after calling make_lists, the input and the result still both exist as state variables (immutable, yes, but that's not enough)! At the same time, I haven't looked at code for a lisp interpreter, but I feel safe assuming that it allocates some memory somewhere. Functional programming doesn't have anything to do with the underlying implementation. The trick here, if any, is that the "underlying implementation" and the code are in the same language/program.