|
|
|
|
|
by adam-f
4585 days ago
|
|
A neat trick (tm) for allocating a linked list:
recursively call a function which allocates a node on the stack, hooking them up in the function... call something else and pass the list to it. at the exit condition (whatever that is), exit the recursion and call something else with your new linked list. (I used something similar to keep track of scope while recursively evaluating in this toy language I made once.) |
|