On Friday, 11 January 2019 at 16:02:27 UTC, Head Scratcher wrote:
Thank you. This works great. What I don't understand is how a key-value pair ends up being a set of strings. Where did the value of the key-value pair get removed? According to the library documentation, the array function "allocates an array and initializes it with copies of the elements of range r." So wouldn't the resulting array contain pairs? And if so, how does the sort work on pairs?

By map you map the pair to its key resp. its first element. The result of the map contains the right-hand side of the "=>" expression only.

Reply via email to