9
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

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
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.