style: auto-format example files with lux fmt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
// Factorial function demonstrating recursion
|
||||
//
|
||||
// Expected output: 10! = 3628800
|
||||
fn factorial(n: Int): Int = if n <= 1 then 1 else n * factorial(n - 1)
|
||||
|
||||
fn factorial(n: Int): Int =
|
||||
if n <= 1 then 1
|
||||
else n * factorial(n - 1)
|
||||
|
||||
// Calculate factorial of 10
|
||||
let result = factorial(10)
|
||||
|
||||
// Print result using Console effect
|
||||
fn showResult(): Unit with {Console} =
|
||||
Console.print("10! = " + toString(result))
|
||||
fn showResult(): Unit with {Console} = Console.print("10! = " + toString(result))
|
||||
|
||||
let output = run showResult() with {}
|
||||
|
||||
Reference in New Issue
Block a user