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,12 +1,7 @@
// Stress test for RC system WITH shared references
// Forces rc>1 path by keeping aliases
fn processWithAlias(n: Int): Int = {
let nums = List.range(1, n)
let alias = nums // This increments rc, forcing copy path
let _len = List.length(alias) // Use the alias
// Now nums has rc>1, so map must allocate new
let alias = nums
let _len = List.length(alias)
let doubled = List.map(nums, fn(x: Int): Int => x * 2)
let filtered = List.filter(doubled, fn(x: Int): Bool => x > n)
let reversed = List.reverse(filtered)
@@ -15,12 +10,9 @@ fn processWithAlias(n: Int): Int = {
fn main(): Unit = {
Console.print("=== RC Stress Test (Shared Refs) ===")
// Run multiple iterations with shared references
let result1 = processWithAlias(100)
let result2 = processWithAlias(200)
let result3 = processWithAlias(500)
let result4 = processWithAlias(1000)
Console.print("Completed 4 chains with shared refs")
}