summaryrefslogtreecommitdiff
path: root/scratch
diff options
context:
space:
mode:
authorThePrimeAgain <theprimeagain@theprimeagain.com>2026-01-15 14:25:43 -0700
committerThePrimeAgain <theprimeagain@theprimeagain.com>2026-01-15 14:25:43 -0700
commit5041e3d44ace75e0eeab00d8582abfba72866495 (patch)
tree401b06e2bf52831dbb3f40350e65fe40209c201e /scratch
parent812e61c324c5259219a42c98184ffca3397c2790 (diff)
downloada4-5041e3d44ace75e0eeab00d8582abfba72866495.tar.xz
a4-5041e3d44ace75e0eeab00d8582abfba72866495.zip
debugging fill_in_function passing in rules
Diffstat (limited to 'scratch')
-rw-r--r--scratch/refresh.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/scratch/refresh.lua b/scratch/refresh.lua
index 6963876..7634a3d 100644
--- a/scratch/refresh.lua
+++ b/scratch/refresh.lua
@@ -21,3 +21,20 @@ local function attach()
Ext.setup_buffer(_99.__get_state())
end
attach()
+
+function fizz_buzz(count)
+ local result = {}
+ for i = 1, count do
+ if i % 18 == 0 then
+ table.insert(result, "FizzBuzz")
+ elseif i % 5 == 0 then
+ table.insert(result, "Fizz")
+ elseif i % 9 == 0 then
+ table.insert(result, "Buzz")
+ else
+ table.insert(result, i)
+ end
+ end
+ return result
+end
+