style: auto-format example files with lux fmt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 06:52:44 -05:00
parent 8c90d5a8dc
commit 44ea1eebb0
54 changed files with 580 additions and 1483 deletions

View File

@@ -1,22 +1,11 @@
// FizzBuzz - print numbers 1-100, but:
// - multiples of 3: print "Fizz"
// - multiples of 5: print "Buzz"
// - multiples of both: print "FizzBuzz"
fn fizzbuzz(n: Int): String =
if n % 15 == 0 then "FizzBuzz"
else if n % 3 == 0 then "Fizz"
else if n % 5 == 0 then "Buzz"
else toString(n)
fn fizzbuzz(n: Int): String = if n % 15 == 0 then "FizzBuzz" else if n % 3 == 0 then "Fizz" else if n % 5 == 0 then "Buzz" else toString(n)
fn printFizzbuzz(i: Int, max: Int): Unit with {Console} =
if i > max then ()
else {
Console.print(fizzbuzz(i))
printFizzbuzz(i + 1, max)
}
if i > max then () else {
Console.print(fizzbuzz(i))
printFizzbuzz(i + 1, max)
}
fn main(): Unit with {Console} =
printFizzbuzz(1, 100)
fn main(): Unit with {Console} = printFizzbuzz(1, 100)
let output = run main() with {}