logo       

drop for negative argument: msg#00050

lang.haskell.glasgow.bugs

Subject: drop for negative argument

Hello,

I found that in GHC.List, drop is defined so that

drop (-1) ls = [],

which probably is a typing-error, since it disobeys the

splitAt n ls == (take n ls, drop n ls)

rule. I suggest changing that in future releases.

Regards,
Daniel Fischer


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise