Cumulative standard deviation: Difference between revisions
Content deleted Content added
m copy edit - wiki link to wikipedia |
m →With a Class: corrected requirements |
||
Line 1,360: | Line 1,360: | ||
=={{header|Tcl}}== |
=={{header|Tcl}}== |
||
===With a Class=== |
===With a Class=== |
||
{{works with|Tcl|8.6}} |
{{works with|Tcl|8.6}} or {{libheader|TclOO}} |
||
<lang tcl>oo::class create SDAccum { |
<lang tcl>oo::class create SDAccum { |
||
variable sum sum2 num |
variable sum sum2 num |
||
Line 1,396: | Line 1,396: | ||
which produces the output: |
which produces the output: |
||
<pre>the standard deviation is: 2.0</pre> |
<pre>the standard deviation is: 2.0</pre> |
||
===With a Coroutine=== |
===With a Coroutine=== |
||
{{works with|Tcl|8.6}} |
{{works with|Tcl|8.6}} |