This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package vector | |
import ( | |
"math" | |
) | |
func (vector *Vector) Sum() float64 { | |
return vector.memoize("sum", func() float64 { | |
sum := 0.0 | |
for _, v := range vector.values { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gospec | |
import ( | |
"testing" | |
) | |
type specrunner struct { | |
t *testing.T | |
} |
NewerOlder