Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    \$\begingroup\$ Great answer, I hoped I'd get some answers for not (purely) functional languages :) I suppose you should use Object as input and output, for the sake of universality \$\endgroup\$ Commented Oct 18, 2023 at 15:29
  • 1
    \$\begingroup\$ @LegendaryWizard I've changed the input-type to an Object as well and removed the int-fluff. \$\endgroup\$ Commented Oct 18, 2023 at 15:42
  • \$\begingroup\$ 170... if I've understood correctly, this is 26 bytes in ES6... \$\endgroup\$ Commented Oct 18, 2023 at 16:50
  • 1
    \$\begingroup\$ @Neil Ikr.. And it's probably <20 bytes in Haskell I'd assume. Insert_Java_is_verbose_meme_here. 🤷 \$\endgroup\$ Commented Oct 18, 2023 at 17:04
  • \$\begingroup\$ (25... I accidentally counted a semicolon...) \$\endgroup\$ Commented Oct 19, 2023 at 23:46