Re: [pure-lang-users] row and col
Status: Beta
Brought to you by:
agraef
|
From: Albert G. <Dr....@t-...> - 2008-09-25 01:19:19
|
Eddie Rucker wrote: > row x::matrix i::int > > Is this backwards? Shouldn't it be 'row i::int x::matrix' so that > row can be used in map, filter, and friends. > > > map (row 0) [m1, m2, m3]; No, I prefer it the other way round, e.g. rows x = map (row x) (0..n-1) when n,_ = dim x end; (Well, that's already in the prelude, but you get the idea...) And note that you can also write map (flip row 0) [m1, m2, m3] to get what you want. Albert -- 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 |