Proposal: Add concatMapM function (#2042)

Ross Paterson ross at soi.city.ac.uk
Wed Jan 30 07:31:10 EST 2008


On Tue, Jan 29, 2008 at 01:11:45PM +0100, Twan van Laarhoven wrote:
> I think we should ignore the generalization to 
> genericSuperDuperConcatMapMXYZ for now :).

Why?  I think the fact that this is a special case argues against
inclusion in the core libraries.  Also that it's a simple compound of
existing functions.

It seems there's a philosophical difference here, which has come up
before (in the intercalate and &&& discussions, and probably others).

Some feel that the purpose of the library is to make programs shorter,
so it should have names for every common idiom and special case.

On the other hand there's the view that the core libraries should be a
smallish collection of general primitives with little overlap, so that
programmers can become familiar with a powerful but manageable toolkit.
Jon Fairbairn expanded on this viewpoint in a previous discussion.
In this view, concatMap itself was a mistake, which must be retained for
backward compatibility, but should not be used as a model for the future.

If we are interested in accomodating both views, perhaps separate
packages are the way to go.


More information about the Libraries mailing list