Max Rabkin | 14 Jan 20:34
Picon

Re: some ideas for Haskell', from Python

2009/1/14 Tim Wawrzynczak <inforichland <at> gmail.com>:
> The reason the macro is better is that the length of the list is known at
> compile time, so you don't need to traverse the list to calculate the length
> of the list.

Or you could use a real compiler (perhaps even a glorious one) that
does constant folding when the list length is constant, but have your
function still work when it isn't constant.

--Max

Gmane