1) What's the difference between your:
"tail ~(Cons _ xs) = xs"
and the more simple:
"tailStrict (Cons _ xs) = xs" ?

I'm no expert - but I can't think of any difference at all.

2) Why don't you also use an irrefutable pattern in "take"? "take" is
now defined as:

This is a trickier question: should "take 0 undefined" by [] or undefined? I'm not sure what the best choice is. I suppose it makes sense to stick with the behaviour of Data.List and return an empty list, even if any program that relies on this not being undefined is probably broken. I've uploaded a new version.

Thanks for your comments!

  Wouter

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to