jorendorff / turtle-wars

3 stars 4 forks source link

Better error checking in library functions #12

Open jorendorff opened 11 years ago

jorendorff commented 11 years ago

Currently rep n {...} loops forever if n is negative or not a whole number. This is because it’s implemented using a loop that only terminates when eq? n 0.

Generally the game is unfun when bugs are hard to spot. stdlib functions should typecheck and throw early.