numbers = [1, 2, 3, 4, 5]
squared = numbers.map { |n| n * n }
puts squared # خروجی: [1, 4, 9, 16, 25]