func-math.go: add() now supports general iterators. TODO: do the same thing to mul()

This commit is contained in:
Celestino Amoroso 2024-05-01 05:55:37 +02:00
parent 924f5da725
commit 7aabd068ed

View File

@ -10,7 +10,7 @@ import (
)
func checkNumberParamExpected(funcName string, paramValue any, paramPos int) (err error) {
if !(isNumber(paramValue) || isList(paramValue)) {
if !(isNumber(paramValue) || isList(paramValue) || isIterator(paramValue)) {
err = fmt.Errorf("%s(): param nr %d has wrong type %T, number expected", funcName, paramPos+1, paramValue)
}
return