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


function sum_of_squares(sequence s) return sum(sq_power(s,2)) end function
?apply({{},{3,1,4,1,5,9},tagset(10)},sum_of_squares)
