The easiest way to blog the interesting things you find on the web. Supports Blogger, Wordpress, Typepad, Live Journal, Movable Type, and Vox.learn more»
Please critique this tail call optimizing decorator I've written. I've tried to fix the pitfalls of other proposed decorators, and the result is this one that supports mutual recursion, does not use exceptions, stack inspection or any implementation-dependent hack, and is pretty short and fast - the fastest out of the ones I could find and try. In fact, in tail-recursive environments I tested the impact of using the decorator is difficult to even measure, as the extra time the decorator takes to run is probably saved by the better use of cache memory. The only caveat is that if used in a function that's not called in a tail-recursive fashion, bad things will happen.
copy and paste this stylesheet into your blog template...