<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/arithmetic.go
diff options
context:
space:
mode:
Diffstat (limited to 'subex/arithmetic.go')
-rw-r--r--subex/arithmetic.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/subex/arithmetic.go b/subex/arithmetic.go
index 52f576d..a7dc73a 100644
--- a/subex/arithmetic.go
+++ b/subex/arithmetic.go
@@ -10,7 +10,7 @@ func sumValues(atoms []walk.Atom) ([]walk.Atom, error) {
allBools := true
var sum float64 = 0
var any bool = false
- values, err := walk.MemoryCompound(atoms)
+ values, err := walk.Compound(atoms)
if err != nil {
return nil, err
}
@@ -50,7 +50,7 @@ func multiplyValues(atoms []walk.Atom) ([]walk.Atom, error) {
allBools := true
var product float64 = 1
var all bool = false
- values, err := walk.MemoryCompound(atoms)
+ values, err := walk.Compound(atoms)
if err != nil {
return nil, err
}
@@ -89,7 +89,7 @@ func multiplyValues(atoms []walk.Atom) ([]walk.Atom, error) {
// Does tries to cast all to numbers and negates them
func negateValues(atoms []walk.Atom) ([]walk.Atom, error) {
var negatedNumbers []walk.Atom
- values, err := walk.MemoryCompound(atoms)
+ values, err := walk.Compound(atoms)
if err != nil {
return nil, err
}
@@ -123,7 +123,7 @@ func negateValues(atoms []walk.Atom) ([]walk.Atom, error) {
// Else errors
func reciprocalValues(atoms []walk.Atom) ([]walk.Atom, error) {
var reciprocals []walk.Atom
- values, err := walk.MemoryCompound(atoms)
+ values, err := walk.Compound(atoms)
if err != nil {
return nil, err
}
@@ -156,7 +156,7 @@ func reciprocalValues(atoms []walk.Atom) ([]walk.Atom, error) {
// If all are castable to booleans, NOTs all and returns them
// Else errors
func notValues(atoms []walk.Atom) (notted []walk.Atom, err error) {
- values, err := walk.MemoryCompound(atoms)
+ values, err := walk.Compound(atoms)
if err != nil {
return nil, err
}