Skip to content

Instantly share code, notes, and snippets.

@asandroq
Forked from outworlder/define-page.scm
Created March 9, 2010 20:05
Show Gist options
  • Save asandroq/327047 to your computer and use it in GitHub Desktop.
Save asandroq/327047 to your computer and use it in GitHub Desktop.
(define-syntax define-page
(syntax-rules ()
((_ name title headers body ...) (define (name #!rest params)
(let* ([post-data (process-request)]
[form-data (if post-data
(append post-data
params)
params)])
(html-body name
(lambda ()
body ...) headers))))
((_ name title body ...) (define-page title '() body ...))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment