diff options
| author | Joe Carstairs <me@joeac.net> | 2025-07-17 23:15:31 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2025-07-17 23:15:41 +0100 |
| commit | eb5c1e031ee69e4eef68d3054c973ded23dc8e64 (patch) | |
| tree | 33076accf4c5971318b148e482a877a56d5f1e8b /requirements/catalogue/req-030.md | |
| parent | 5a75def2f5e9cd5f3421a908505c59ac074dae74 (diff) | |
applies formatting
Diffstat (limited to 'requirements/catalogue/req-030.md')
| -rw-r--r-- | requirements/catalogue/req-030.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/requirements/catalogue/req-030.md b/requirements/catalogue/req-030.md index e09a281..d211964 100644 --- a/requirements/catalogue/req-030.md +++ b/requirements/catalogue/req-030.md @@ -1,12 +1,13 @@ # req-030 -Schist must implement the procedure described below as `calculate_bucket_balance`. +Schist must implement the procedure described below as +`calculate_bucket_balance`. ## calculate_bucket_balance Inputs: -- A bucket name, `name` +- A bucket name, `name` 1. If no bucket exists with the name, `name`, then return empty. 2. If more than one bucket exists with the name, `name`, then panic. @@ -19,7 +20,7 @@ Inputs: req-037. 8. Let `transaction_sum` be the sum over the property, `amount`, of all transactions `t` such that `t.bucket_id = bucket.id`. -9. Let `drip_sum` be the sum over the property, `amount`, of all drips `d` such +9. Let `drip_sum` be the sum over the property, `amount`, of all drips `d` such that `d.bucket_id = bucket.id`. 10. Return `drip_sum - transaction_sum`. |
