diff options
| author | Marius Peter <dev@marius-peter.com> | 2025-11-20 15:47:02 +0100 |
|---|---|---|
| committer | Marius Peter <dev@marius-peter.com> | 2025-11-20 15:47:02 +0100 |
| commit | 25b6c990cbf3620436cd1b1a513015f482a9898e (patch) | |
| tree | f647baa2ea3d70ea18110b1a92863b2eb01f65a7 /models/crop-requirement.rkt | |
| parent | b1a7860276c16a8c850abb3fc331c7841a013bcd (diff) | |
Fix nutrient values doubling bug.
RTFM
Diffstat (limited to 'models/crop-requirement.rkt')
| -rw-r--r-- | models/crop-requirement.rkt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/crop-requirement.rkt b/models/crop-requirement.rkt index 7d7b5aa..0b31119 100644 --- a/models/crop-requirement.rkt +++ b/models/crop-requirement.rkt @@ -152,4 +152,4 @@ (for/fold ([acc acc]) ([(nutrient value) (in-hash (crop-requirement-nutrient-values crop-requirement))]) (define contribution (* value weight)) - (hash-update acc nutrient (λ (old) (+ old contribution)) (λ () contribution))))) + (hash-update acc nutrient (λ (old) (+ old contribution)) 0)))) |