2009/1/14 Tim Wawrzynczak <[email protected]>:
> 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
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to