add support for scaling recipes by numerical factors
This commit is contained in:
parent
a1dc85b2f7
commit
92c70970f5
|
@ -107,6 +107,11 @@
|
||||||
(make-recipe new-name new-servings new-ingredients new-steps)
|
(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
|
;; Constructors
|
||||||
|
|
||||||
(define make-recipe
|
(define make-recipe
|
||||||
|
|
Loading…
Reference in New Issue
Block a user