// Benchmark: List operations (measures collection performance)
// Tests: List creation, map, filter, fold

fn square(x: Int): Int = x * x
fn isEven(x: Int): Bool = x % 2 == 0
fn add(acc: Int, x: Int): Int = acc + x

// Create a list of 10000 elements
let numbers = List.range(1, 10000)

// Map: square each element
let squared = List.map(square, numbers)

// Filter: keep only even numbers
let evens = List.filter(isEven, squared)

// Fold: sum all values
let sumResult = List.fold(0, add, evens)
