fun error s = (Page.return ("Error: " ^ s) `An error occurred while generating a recipe for you; use your browser's back-button to backup and enter a number in the form.` ; Web.exit()) val persons = case FormVar.wrapOpt FormVar.getNatErr "persons" of SOME n => real n | NONE => error "You must type a number" fun pr_num s r = if Real.== (r,1.0) then "one " ^ s else if Real.==(real(round r),r) then Int.toString (round r) ^ " " ^ s ^ "s" else Real.toString r ^ " " ^ s ^ "s" val _ = Page.return "Apple Pie Recipe" `To make an Apple pie for ^(pr_num "person" persons), you need the following ingredients:
Make another recipe.`