Task

Take a combined set of elements and apply a function to each element.




// create a list of numbers 1-10
numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
 
// display the list as it is
println numbers
 
// square each element in the list
for i in range(1, len(numbers) - 1)
	numbers[i] = numbers[i] * numbers[i]
end
 
// display the squared list
println numbers