Re: [q-lang-users] "listof" surprises
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2007-05-16 00:20:07
|
ma...@ma... wrote: > I just got burned by this unexpected (for me, of course) behavior of > list comprehension. Given the program > > delta X X = 1; > delta _ _ = 0 otherwise; > tabulate N M F = [[F I J : I in [1..N]] : J in [1..M]]; > eye N = tabulate N N delta; > > then (eye 2) evaluates to [[0,0],[0,0]] instead of [[1,0],[0,1]] as I > would have imagined. Ok, this bug is fixed in cvs now (qmfuns.c revision 1.62). ==> eye 2 [[1,0],[0,1]] -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |