isaacg1 / pyth

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

Some fixes #151

Closed jakobkogler closed 9 years ago

jakobkogler commented 9 years ago

.f (first_n) actually looked for the first n+1 numbers and simply discarded the last one. It obviously worked, but if you want to remember the some value from the nth (the last) computation in a with an assignment, it remembered the value from the (n+1)th.

E.g. .fJZTZJ printed 11, because it already determined the 11th valid number.

This commit changes the behavior. It only generates the first n numbers, so .fJZTZJ prints 10.

jakobkogler commented 9 years ago

Added another commit, which fixes #150. The documentation only matched, when the sequence was a list. Didn't work when the it was a string.