(it iter.Seq[ast.Constant])
| 1385 | } |
| 1386 | |
| 1387 | func evalMin(it iter.Seq[ast.Constant]) (ast.Constant, error) { |
| 1388 | min := int64(math.MaxInt64) |
| 1389 | for c := range it { |
| 1390 | num, err := c.NumberValue() |
| 1391 | if err != nil { |
| 1392 | return ast.Constant{}, err |
| 1393 | } |
| 1394 | if num < min { |
| 1395 | min = num |
| 1396 | } |
| 1397 | } |
| 1398 | return ast.Number(min), nil |
| 1399 | } |
| 1400 | |
| 1401 | func evalFloatMin(it iter.Seq[ast.Constant]) (ast.Constant, error) { |
| 1402 | min := math.MaxFloat64 |
no test coverage detected