FG:

    auto query = iota(2, 2 + 10)
.map!(c => ["Length": 2 * c, "Height": c * c - 1, "Hypotenuse": c * c + 1])
    .map!(x => format("%4d%4d%4d", x["Height"],

Unlike other languages like JavaScript, the D front-end is very weak in optimizing well such kind of code... I think D compilers handle built-in associative arrays in a very straight way.

Bye,
bearophile

Reply via email to