diff --git a/parse.scm b/parse.scm index 0489244..6bfbf68 100644 --- a/parse.scm +++ b/parse.scm @@ -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