Skip to content

Instantly share code, notes, and snippets.

package vector
import (
"math"
)
func (vector *Vector) Sum() float64 {
return vector.memoize("sum", func() float64 {
sum := 0.0
for _, v := range vector.values {
package gospec
import (
"testing"
)
type specrunner struct {
t *testing.T
}