isaacg1 / pyth

Pyth, an extremely concise language. Try it here:
https://pyth.herokuapp.com/
MIT License
263 stars 57 forks source link

Pad empty string/list to a positive length #212

Closed jakobkogler closed 8 years ago

jakobkogler commented 8 years ago

.[ABC is mostly used to pad A to a length of C. Through the introduction of modular padding this didn't work when A is empty. E.g. .[Y1 3 returned [] and not [1, 1, 1].

This commit changes to behavior, so that the padding length will be always positive.

Added also tests.