Eduardo Cavazos wrote:

Here's a version in FP style, just for fun.

I actually think this is a useful exercise. This version goes to an extreme of using higher-order procedures, and many folks won't go this far. But, it's quite common for Schemers to use higher-order procedures here and there. This version clearly illustrates that there *is* a cost to using higher-order procedures, at least in some implementations.

I wonder, what state-of-the-art compilers could deal with the higher-order style without suffering a performance hit? MLton? Stalin?

Perhaps I should see how furry paws performs here.

Ed

Reply via email to