(func: Func[Value], values: list[Value])
| 26 | Func = Callable[[Value, Value], Value] |
| 27 | |
| 28 | def combine(func: Func[Value], values: list[Value]) -> Value: |
| 29 | assert len(values) > 0 |
| 30 | |
| 31 | result = values[0] |
| 32 | for next_value in values[1:]: |
| 33 | result = func(result, next_value) |
| 34 | |
| 35 | return result |
| 36 | |
| 37 | Real = TypeVar("Real", int, float) |
| 38 |
no test coverage detected