You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
385 B
8 lines
385 B
ID = lambda(x) x end
|
|
FIZZ = lambda(x) 'FIZZ' end
|
|
BUZZ = lambda(x) 'BUZZ' end
|
|
FIZZBUZZ = lambda(x) 'FIZZBUZZ' end
|
|
L = [FIZZBUZZ] + (for i in range(14) do if !((i + 1) % 3) then continue FIZZ end if !((i + 1) % 5) then continue BUZZ end continue ID end)
|
|
func fizzbuzz(s, e) return for i in range(e-s) do continue L[(i + s)%(#L)](i + s) end end
|
|
|
|
for i in fizzbuzz(1, 101) do print(i) end
|