jellylanguage
jellylanguage copied to clipboard
Improve `D` (decimal) atom
Make D
(to decimal) take the ord
first if given a character.
@ScratchMan544 Why should it take the ordinal of a character and not just the digit the character itself represents ([0-9]
) or 0
if the character is not a digit? That's how bit-wise functions (&
, |
, ^
, ~
) behave.
Taking the digit the character represents is not a particularly useful operation in this cae – after all, we're converting to decimal, so that would essentially just be an "eval". The reason I chose the ordinal is because that's what I actually found useful when golfing.