[Haskell-cafe] some ideas for Haskell', from Python
Max Rabkin
max.rabkin at gmail.com
Wed Jan 14 14:34:05 EST 2009
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
More information about the Haskell-Cafe
mailing list