root mean square

Following rosettacode, the RMS is calculated as the mean of the squares of the numbers, square-rooted: √(Σ xi2)/n.

{def rms
 {lambda {:n}
  {sqrt
   {/ {+ {S.map {lambda {:i} {* :i :i}}
                {S.serie 1 :n}}}
      :n}}}}
-> rms

{rms 10}
-> 6.2048368229954285