fn main(): Unit = { Console.print("=== Allocation Comparison ===") // FBIP path (rc=1): list is reused Console.print("Test 1: FBIP path") let a1 = List.range(1, 50) let b1 = List.map(a1, fn(x: Int): Int => x * 2) let c1 = List.reverse(b1) Console.print("FBIP done") // To show non-FBIP, we need concat which doesn't have FBIP Console.print("Test 2: Non-FBIP path (concat)") let x = List.range(1, 25) let y = List.range(26, 50) let z = List.concat(x, y) // concat always allocates new Console.print("Concat done") }