Skip to main content

Timeline for Convert Input to Direction

Current License: CC BY-SA 3.0

16 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited CommunityBot
Commonmark migration
Mar 25, 2017 at 0:03 comment added Arjun @ETHproductions Thanks a lot! I removed 4 of them. The rest 2 are necessary are necessary, as Luke mentions.
Mar 24, 2017 at 23:59 history edited Arjun CC BY-SA 3.0
added 12 characters in body
Mar 24, 2017 at 16:32 comment added Luke He does... These parentheses cannot be left out: a|b?(...)+(...):"", all others can, saving 4B in total.
Mar 24, 2017 at 14:50 comment added ETHproductions I don't think you need any of the parentheses ;)
Mar 24, 2017 at 9:37 comment added Arjun @Luke I think you should post it as an answer!
Mar 24, 2017 at 9:07 history edited Arjun CC BY-SA 3.0
added 22 characters in body
Mar 24, 2017 at 7:51 comment added user41805 Are you sure you need the semi-colon at the end?
Mar 24, 2017 at 7:48 comment added Arnauld Also, you don't need these parentheses: a?(...):"" / b?(...):""
Mar 24, 2017 at 7:42 comment added Arnauld You can safely use a|b instead of a||b. Assuming that the input only consists of -1, 0 or 1 (which is unclear to me), you could replace a>0 and b>0 with ~a and ~b.
Mar 24, 2017 at 7:35 comment added Tom Save another byte by doing f=a=>b=> and calling the function like f(1729)(1458); which is the currying syntax that @Luke mentioned.
Mar 24, 2017 at 6:30 comment added Arjun @Luke Thanks for the suggestion! I have edited the answer. Now, I am beating the PHP and Python solutions! All because of you!!! Thanks!
Mar 24, 2017 at 6:30 history edited Arjun CC BY-SA 3.0
added 9 characters in body
Mar 24, 2017 at 6:27 comment added Luke a!=0 can be replaced by just a, since 0 is falsy and all other values are truthy. Also, taking input in currying syntax is shorter, and the array appoach is also shorter.
Mar 24, 2017 at 0:14 history edited Arjun CC BY-SA 3.0
added 509 characters in body
Mar 24, 2017 at 0:02 history answered Arjun CC BY-SA 3.0