Hacker News new | ask | show | jobs
by dhotson 1034 days ago
Yeah, that's a great demonstration of the technique.

One tiny tip.. :) you can pass a block to `.to_h`, so instead of using `.map` + `.to_h`:

    h.map { |k,v| [k, v] }.to_h
.. it can be simplified to:

    h.to_h { |k,v| [k, v] }