Welcome to the CHICKEN Scheme pasting service
matchable hate pasted by andyjpb on Wed Aug 15 17:34:21 2012
(define (dummy-session-handler)
(lambda (c)
(match-let (((success details session) (find-session)))
(if success
(send-status 'ok (->string `(,success ,details ,session)))
(begin (write details) (newline)
(match details
('invalid-session (send-status 'not-found "invalid session"))
('invalid-secret (send-status 'not-found "invalid secret"))
('session-not-found (send-status 'not-found "session not found"))
((quote no-cookie) (send-status 'not-found "cookie"))
(else (send-status '500 (conc "Failure during session handling: " details)))))))
))Matching quotes added by alaricsp on Wed Aug 15 17:51:39 2012
Try these: (let ((x ''foo)) (printf "Matching ~S\n" x) (match x ('foo (printf "Found foo\n")) (''foo (printf "Found 'foo\n")))) (let ((x 'foo)) (printf "Matching ~S\n" x) (match x ('foo (printf "Found foo\n")) (''foo (printf "Found 'foo\n")))) ...the difference purely being in the definition of x