Welcome to the CHICKEN Scheme pasting service

spiffy chunks added by carld on Wed Jan 25 16:31:51 2012

(use spiffy intarweb)

(define chunks (list "Hello" "World"))

(define (send-chunked path)
  (with-headers `((Connection close)
                  (Transfer-Encoding chunked))
    (lambda ()
      (write-logged-response)))
  (with-output-to-port (response-port (current-response))
    (lambda ()
      (map (lambda(chunk)
             (printf "~X\x0d\x0a~A\x0d\x0a~!"
                     (string-length chunk) chunk))
           chunks)
      (printf "0\x0d\x0a\x0d\x0a~!"))))

(vhost-map `((".*" .  ,(lambda (continue)
                (parameterize ((handle-not-found send-chunked))
                              (continue))))))

(server-port 8080)
(start-server)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which one-argument R5RS procedure returns 3 when given `'(1 2 3 4)' as input?
Visually impaired? Let me spell it for you (wav file) download WAV