Posts tagged ‘scheme blog’

A New Beginning

Didn’t feel like working this afternoon, so instead, I updated my blog software to WordPress 2.5.

Here’s some Scheme code for all of you fans out there:

(define-record-type keystroke
  (%make-keystroke %value %meta?)

  (%value char-value)
  (%meta? meta?))

(define-record-discloser keystroke
  (lambda (k)

 Keystroke ,(keystroke->sexpr k) ,(keystroke-hash k) )))


  (parse-key form)
  (if (list? form)
      (let ((tag (car  form))

            (val (cadr form)))
        (case tag

 control) (

 %control  (parse-key val)))
          ((meta)    (

 %meta     (parse-key val)))

      (%key     val))


       (error "This is not a valid key form " tag))))
      (%key form)))