Question about typing

Jan Skibinski jans@numeric-quest.com
Thu, 5 Apr 2001 17:15:01 -0400 (EDT)


On Fri, 6 Apr 2001, Tom Pledger wrote:

> If you're adding every element of the first list to every element of
> the second list, it's sometimes called diagonalisation.

	I do not know where this definition came from but it
	does not make sense to me. It is zipping that looks
	like a diagonalization, not the other way around.

	[f ai bj | ai <- a, bj <- b] 
	This looks like an outer product of two vectors,
	or a matrix represented as a linear vector of
	dimension n x m, where n = length a, m = length b.
	If f = (*) then it is really the outer product.  


	[ai * bj | (ai, bj) <- zip a b] 
	But this is a list of diagonal elements of the
	outer product above, providing that n == m.

	Jan