[Haskell-cafe] Re: Very crazy

Aaron Denney wnoise at ofb.net
Tue Sep 25 18:11:39 EDT 2007

On 2007-09-25, Philippa Cowderoy <flippa at flippac.org> wrote:
> On Tue, 25 Sep 2007, Lennart Augustsson wrote:
>> It's reasonably easy to read.
>> But you could make it more readable.  Type signatures, naming the first
>> lambda...
> It might be reasonable to define something like mapMatrix that happens to 
> be map . map, too. Along with at least a type synonym for matrices.

Yes, that's a good idea.  Because it lets you change from the often
annoying list-of-lists implementation to something more reasonable for
e.g. transpose, as recently mentioned.

> Name domain constructs rather than expecting people to reconstruct
> them from their implementations, in other words.

Right.  But a list-of-lists isn't a terribly specific domain construct.
When it's used without further semantics, I think map . map is the best
translation of intent.

Aaron Denney

More information about the Haskell-Cafe mailing list