| ▲ | lgas 2 days ago | |
I've never used D, but it appears to be valid syntax. https://dlang.org/spec/function.html#postconditions | ||
| ▲ | diath 2 days ago | parent | next [-] | |
I'm not asking about the syntax, I'm asking about the logic where a value can be equal to itself plus another value when the pre-condition is that it must be > 0. | ||
| ▲ | prydt 2 days ago | parent | prev [-] | |
The syntax is correct but I made a logical error since balance is being compared to itself (as opposed to the new balance at the end). | ||