Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    Optimizations like the kind you described are almost always going to make the code a bit less elegant. Commented Oct 6, 2012 at 16:25
  • @Robert Harvey: Are there any alternative techniques to keep stack usage low? I mean I imagine I have to rewrite my functions differently but I have no clue whether there are well-established techniques. My first attempt was to use tail-recursive functions, which helped but did not allow me to solve my problem completely. Commented Oct 6, 2012 at 19:17