Currently, the shortest way to get the length of stack on the stack itself is:
]:B~B,
which is 6 bytes. It would be nice to have a way to put the length of stack on the stack in 2 bytes using some e? command
Not to mention that the above 6 byte code does not work if the stack contains just characters
For example,
': '. '- ]:B~B,
will try to evaluate the string ":.-" and fail.
5 bytes:
]_,+~
Works even if there are only characters.
Cool. Used this in my answer to save 1 byte! But it would still be nice to get a 2 byte operator for it :)
Log in to post a comment.
Not to mention that the above 6 byte code does not work if the stack contains just characters
For example,
will try to evaluate the string ":.-" and fail.
5 bytes:
Works even if there are only characters.
Cool. Used this in my answer to save 1 byte! But it would still be nice to get a 2 byte operator for it :)