diff --git a/scheme/httpd/surflets/web-server/root/surflets/add-surflet.scm b/scheme/httpd/surflets/web-server/root/surflets/add-surflet.scm index 7685956..72adf0f 100644 --- a/scheme/httpd/surflets/web-server/root/surflets/add-surflet.scm +++ b/scheme/httpd/surflets/web-server/root/surflets/add-surflet.scm @@ -35,16 +35,21 @@ (get-number "Addition - Step two" "Second number:")) (define (main req) + (let ((number-1 (get-number-1)) + (number-2 (get-number-2))) + (show-result (+ number-1 number-2)))) + + (define (show-result result) (send-html `(html (title "Result") - (body (h2 "Result") - (p ,(+ (get-number-1) (get-number-2)) - (hr) - (p (url "add-surflet.scm" "Make new calculation.") (br) - (url "javascript:history.go(-2)" "New calculation (same session)") - (br) - (url "/" "Return to main menu.")))))) - - "this string will never be evaluated") + (body (h2 "Result") + (p ,result + (hr) + (p (a (@ (href "add-surflet.scm")) + "Make new calculation.") (br) + (a (@ (href "/")) + "Return to main menu.")))))) + "This string will never be evaluated.") + )) \ No newline at end of file