From 16825c1f6cb8aada73b6c3a9ce1af4a85041b880 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 26 May 2024 21:50:17 +0100 Subject: Use range --- examples/fizzbuzz.fco | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/examples/fizzbuzz.fco b/examples/fizzbuzz.fco index 7474ed7..d2d510d 100644 --- a/examples/fizzbuzz.fco +++ b/examples/fizzbuzz.fco @@ -14,18 +14,6 @@ def fizzbuzz(n) end end -# generate a list of numbers from n to top -def genlist(n top) - def rec(l n top) - if <=(n top) - @rec(+(l list(n)) +(n 1) top) - else - l - end - end - rec(list() n top) -end - def main() - display(map(fizzbuzz genlist(1 20))) + display(map(fizzbuzz ..(1 20))) end -- cgit v1.2.3