Adriandmen / 05AB1E

A concise stack-based golfing language
MIT License
760 stars 48 forks source link

BUG: builtin `j` doesn't work with integers as first argument, and crashes on integer-lists as first argument #173

Open kcruijss opened 4 years ago

kcruijss commented 4 years ago

In the new version of 05AB1E the builtin j can be used to pad leading spaces up to the given length (so the wiki is outdated in that regard as well, which still described its legacy functionality). This is useful, but unfortunately it only seems to work on strings, and not on integers for the first argument (second argument works fine for integers, strings, and decimals).

Try it online to reproduce.
Try just the last test case separated with implicit output to see the FunctionClauseError.
Came across it when I was making a test suite, so no relevant codegolf challenge to link in this case, like I did with the other bugs I reported.