As an implementor of eager haskell, I sometimes think it would be nice
if all list functions checked the length of their argument, thus
stamping out infinite lists forever!

In al seriousness, the prelude functions should support a lazy
programming style as far as is possible.  I found the "split of fixed
chunks" idiom very compelling, and would find it difficult to support
any semantics that would require length checks before calling take or
drop.

For a similar reason, I dont think negative arguments to
take/drop/splitAt really make sense.

I like symmetry arguments---but as a compiler writer I also have another
reason to vote for take and drop to work on negative arguments.  It
allows me to write foldr definitions (which I can deforest, reason about
equationally, etc.) without having to scribble down a side condition!

-Jan-Willem Maessen

Reply via email to