Tips for golfing in Io

9

1

What general tips do you have for golfing in Io? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Io (e.g. "remove comments" is not an answer). Please post one tip per answer.

Animesh 'the CODER'

Posted 2014-01-26T08:30:38.053

Reputation: 959

1Could you add a link to Io? – caird coinheringaahing – 2017-05-21T14:11:54.830

Answers

1

You can stick methods onto the back of most literals

"text" print    # 12 bytes
"text"print     # 11 bytes

12 print        # 8 bytes
12print         # 7 bytes

(0<1,0,1) print # 15 bytes
(0<1,0,1)print  # 14 bytes

Not everything

0x12print # prints nothing

Asone Tuhid

Posted 2014-01-26T08:30:38.053

Reputation: 1 944