The Sol Programming Language!
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

  1. ID = lambda(x) x end
  2. FIZZ = lambda(x) 'FIZZ' end
  3. BUZZ = lambda(x) 'BUZZ' end
  4. FIZZBUZZ = lambda(x) 'FIZZBUZZ' end
  5. 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)
  6. func fizzbuzz(s, e) return for i in range(e-s) do continue L[(i + s)%(#L)](i + s) end end
  7. for i in fizzbuzz(1, 101) do print(i) end