Finding Max Value of Column in Multi-Dimesional Array
Samir
samir at aol.com
Sat Jul 6 12:14:26 UTC 2019
On Friday, 5 July 2019 at 19:56:54 UTC, ag0aep6g wrote:
> It works when you pass an actual callable instead, e.g. a
> lambda:
>
> p.map!(a => a[column]).maxElement.writeln;
On Friday, 5 July 2019 at 20:22:14 UTC, dwdv wrote:
> Furthermore, Samir, the parameter `a` can be renamed to
> whatever you prefer or what fits the code at hand best, e.g.
> `(row => row[column])`, as opposed to the string version, where
> only a small set of mostly single character names is supported.
Thank you very much for the explanation! As I've mentioned
before, I have a lot to learn about the `map` function and the
details provided here help immensely.
Samir
More information about the Digitalmars-d-learn
mailing list