3 ms·
I've never used D, but it appears to be valid syntax. https://dlang.org/spec/function.html#postconditions https://dlang.org/spec/function.html#postconditions
by lgas 21d ago
I've never used D, but it appears to be valid syntax. https://dlang.org/spec/function.html#postconditions https://dlang.org/spec/function.html#postconditions
- prydt 21d agoThe 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).
- diath 21d agoI'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.