style: auto-format example files with lux fmt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
// Math utilities module
|
||||
// Exports: square, cube, factorial
|
||||
fn square(n: Int): Int = n * n
|
||||
|
||||
pub fn square(n: Int): Int = n * n
|
||||
fn cube(n: Int): Int = n * n * n
|
||||
|
||||
pub fn cube(n: Int): Int = n * n * n
|
||||
fn factorial(n: Int): Int = if n <= 1 then 1 else n * factorial(n - 1)
|
||||
|
||||
pub fn factorial(n: Int): Int =
|
||||
if n <= 1 then 1
|
||||
else n * factorial(n - 1)
|
||||
|
||||
pub fn sumRange(start: Int, end: Int): Int =
|
||||
if start > end then 0
|
||||
else start + sumRange(start + 1, end)
|
||||
fn sumRange(start: Int, end: Int): Int = if start > end then 0 else start + sumRange(start + 1, end)
|
||||
|
||||
Reference in New Issue
Block a user