News for hackers. Stuff that matters.
Re:Stages of Denial by wizzwizz4 on Tuesday August 10, 2021 @08:37AM (#28128053)
Yes. I don't know what language that is, but I know what it means: take some key-value pairs, and reduce them with an accumulator, and make a new dictionary with the items from the accumulator, plus another entry mapping a list of the key to a value, starting with {}.

Alternatively:

  mut acc = {}
  for k, v in kvPairs {
    acc[[k]] = v;
  }
  acc
Am I much wrong?
Re:Stages of Denial by lvncelot on Tuesday August 10, 2021 @08:52AM (#28128191)
Huh, no you're exactly right. (It's javascript, btw)