Task

Write a program to find the sum of squares of a numeric vector.

The program should work on a zero-length vector (with an answer of   0).



Related task

   Mean


 
f = {|x| x^2}   // Anonymous function which squares its argument
a = [1,2,3,5,7]
println[sum[map[f,a], 0]]
 