The interesting function which does all the work is:
(define (start req)
;; First, we get input from the user
;; Then, we pause for the link
;; Finally, we show what the user typed.
(let ([input (get-input-from-user)])
(pause-for-link)
(show-input input)))
Each of these calls - get-input-from-user, pause-for-link, and show-input sends a complete page back to the user and waits for them to click a link or submit a form request. It's a really smooth way of solving some problems.
The logical end to this road is continuation-based web servers. See http://docs.racket-lang.org/continue/index.html and my approach to the Arc challenge, https://gist.github.com/1304257
The interesting function which does all the work is:
Each of these calls - get-input-from-user, pause-for-link, and show-input sends a complete page back to the user and waits for them to click a link or submit a form request. It's a really smooth way of solving some problems.