moonscript
moonscript copied to clipboard
repeat..until
Why is repeat..until not supported by MoonScript?
Would you consider adding do..while instead?
Agreed, this could be useful.
I use while true..break if and to me, it's just as clear.
The lua repeat example in PIL can be written as:
sqr = x/2
while true
sqr = (sqr + x/sqr)/2
error = math.abs sqr^2 - x
break if error < x/10000