Proposal: adding 'tailDropWhile' to Data.List
qdunkan at gmail.com
Wed Sep 28 18:11:59 CEST 2011
> > For real use, you are right. But to teach list programming to
> > beginners, I think this is necessary. For instance, I would explain
> > how to process String without regular expressions.
> I still argue that this is a bad idea. To an extent, functional
> programmers tend to focus too much on lists as the be-all and end-all
> of data structures. Whilst lists are great at what they do and
> generally serve as a good "intermediary" data structure (e.g.
> converting a Map k a to a Seq (k,a) ), we should not be abusing them
> to do _everything_.
I don't think that's a realistic attitude at the moment.
tailDropWhile was one of the first things I put in my personal
library, along with various string functions like strip, split, and
join, and I still use them all the time on strings. Certainly the
performance sensitive parts of code use ByteString or Text, but the
vast majority of strings are not in critical sections or are quite
small and using Text everywhere would be awkward syntactically for no
measurable gain. Also a lot of libraries only accept and produce
More information about the Libraries