fn processChain(n: Int): Int = {
    let nums = List.range(1, n)
    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)
    List.length(reversed)
}

fn main(): Unit = {
    Console.print("=== RC Stress Test ===")
    let result1 = processChain(100)
    let result2 = processChain(200)
    let result3 = processChain(500)
    let result4 = processChain(1000)
    Console.print("Completed 4 chains")
    Console.print("Sizes: 100, 200, 500, 1000")
}
