func-math.go: add() now supports general iterators. TODO: do the same thing to mul()
This commit is contained in:
		
							parent
							
								
									924f5da725
								
							
						
					
					
						commit
						7aabd068ed
					
				@ -10,7 +10,7 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func checkNumberParamExpected(funcName string, paramValue any, paramPos int) (err error) {
 | 
					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)
 | 
							err = fmt.Errorf("%s(): param nr %d has wrong type %T, number expected", funcName, paramPos+1, paramValue)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return
 | 
						return
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user