add support for scaling recipes by numerical factors
This commit is contained in:
parent
a1dc85b2f7
commit
92c70970f5
|
@ -105,7 +105,12 @@
|
|||
[new-steps steps]
|
||||
[new-servings wanted-servings])
|
||||
(make-recipe new-name new-servings new-ingredients new-steps)
|
||||
))))
|
||||
))))
|
||||
|
||||
(define scale-recipe-by-factor
|
||||
(lambda (recipe scale-factor)
|
||||
(let ([new-servings (* (recipe-servings recipe) scale-factor)])
|
||||
(scale-recipe recipe new-servings))))
|
||||
|
||||
;; Constructors
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user