Welcome to the CHICKEN Scheme pasting service

How about http://wiki.call-cc.org/egg-index ? pasted by mario-goulart on Fri Jun 10 15:12:14 2011

(lambda (continue)
  (let ((path (uri-path (request-uri (current-request)))))
    (when (equal? "egg-index" (last path))
      (let ((eggs-uri
             (update-uri (request-uri (current-request))
                         path: '(/ "chicken-projects" "egg-index-4.html"))))
        (with-headers `((location ,eggs-uri))
          (lambda ()
            (send-status 302 "Found")))))
    (continue)))

Better check for the exact path pasted by mario-goulart on Fri Jun 10 15:16:01 2011

(lambda (continue)
  (let ((path (uri-path (request-uri (current-request)))))
    (when (equal? "egg-index" '(/ "egg-index"))
      (let ((eggs-uri
             (update-uri (request-uri (current-request))
                         path: '(/ "chicken-projects" "egg-index-4.html"))))
        (with-headers `((location ,eggs-uri))
          (lambda ()
            (send-status 302 "Found")))))
    (continue)))

With spiffy-uri-match's redirect-to pasted by mario-goulart on Fri Jun 10 15:30:16 2011

(vhost-map `((".*" .
              ,(lambda (continue)
                 (let ((path (uri-path (request-uri (current-request)))))
                   (if (equal? path '(/ "egg-index"))
                       (redirect-to "/chicken-projects/egg-index-4.html")
                       (continue)))))))

redirect-to & continue added by mario-goulart on Fri Jun 10 15:39:28 2011

(vhost-map `((".*" .
              ,(lambda (continue)
                 (let ((path (uri-path (request-uri (current-request)))))
                   (when (equal? path '(/ "egg-index"))
                     (redirect-to "/chicken-projects/egg-index-4.html"))
                   (continue))))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which relatively recent Scheme report version does CHICKEN _not_ implement?
Visually impaired? Let me spell it for you (wav file) download WAV