
6 Nov
2009
6 Nov
'09
4:37 a.m.
Martijn van Steenbergen wrote:
Bonus points for the following: * An infinite number of singleton axes produces [origin] (and finishes computing), e.g. forall (infinite) xs. diagN (map (:[]) xs) == map (:[]) xs
This can't be done - you can not produce any output before you have checked that all the lists are not empty: diag (replicate n [0] ++ [[]]) == [] Bertram