News for hackers. Stuff that matters.
Re:Crafting Code in Clojure by markov_twain on Saturday February 02, 2013 @12:09AM (#5155242)
well, I hate to beat a dead horse, but here's a one-liner (ruby):

  (map1.keys | map2.keys).map(&:to_s).sort.join(", ").instance_eval { empty? ? "<none>" : self }
Re:Crafting Code in Clojure by Luyt on Saturday February 02, 2013 @04:49AM (#5155636)
My one-liner:

a = {"fred": 4, "wilma": 8} b = {"t-shirt": 6, "fred": 0}

print ", ".join(sorted(set(a).union(b))) or "<none>"