
On Wed, Jul 11, 2007 at 09:54:10PM +0100, Andrew Coppin wrote:
Chaddaï Fouché wrote:
There is already many thing in standard library. The balance is important.
I agree.
The question is whether we mind lots of people reimplementing this themselves, each using their own different name for it. I believe I read about some plan to add a trivial function named "on" to one of the standard libraries, because having it there makes code more readable. So the question becomes "does putting this thing in the library make people's code clearer, or is the function trivial enough to reimplement that one can readily see what it's for?"
I'd prefer it in the library (probably Data.List), but it's no biggie.
Interestingly, the function is already there; it's called genericLength. However, the lazy natural type isn't. Stefan