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*

8
  • \$\begingroup\$ This can be 47 bytes, if truthy values can be False and falsy values True: TIO! \$\endgroup\$ Commented Jun 14, 2017 at 17:20
  • \$\begingroup\$ Could also use n-a in place of n==a and have -1 and 0 as your return values. \$\endgroup\$ Commented Jun 14, 2017 at 18:06
  • \$\begingroup\$ @carusocomputing I had that in my edit history, but it doesn't work, because for larger test values, you might have -101 or some other result instead of -1. \$\endgroup\$ Commented Jun 14, 2017 at 21:47
  • \$\begingroup\$ @Mr.Xcoder do you really think that saving 1 byte is worth everybody's sanity? \$\endgroup\$ Commented Jun 16, 2017 at 14:23
  • 1
    \$\begingroup\$ @frarugi87 Saving a byte is always worth it \$\endgroup\$ Commented Jun 16, 2017 at 14:25