// List operations benchmark

// Create array of 10000 numbers
const nums = Array.from({length: 10000}, (_, i) => i + 1);

// Map: double each number
const doubled = nums.map(x => x * 2);

// Filter: keep even numbers
const evens = doubled.filter(x => x % 4 === 0);

// Fold: sum all
const sum = evens.reduce((acc, x) => acc + x, 0);

console.log(`Sum: ${sum}`);
