On Friday, 3 January 2014 at 17:38:16 UTC, Gary Willoughby wrote:
I know it can be done via a loop, but is there a more idiomatic way to achieve this?
---- import std.algorithm; import std.range; import std.stdio; void main() { auto aa = ["one":"1", "two":"2"]; auto range = aa.byKey.map!(a => chain(a.only, aa[a].only)); string[] array = range.join; writeln(array); } ----However I'm not sure whether "only" is present in 2.064, maybe it was added recently in the git-head version.