Hacker News new | past | comments | ask | show | jobs | submit
More of an allman Lisp guy myself

  (
  define (match:element variable restrictions)
    (
    define (ok? datum)
      (
      every 
        (
        lambda (restriction)
          (restriction datum)
        )
        restrictions
      )
    )
  (
    define (element-match data dictionary succeed)
      (
      and 
        (ok? data)
        (
        let ((vcell (match:lookup variable dictionary)))
          (
          if vcell
            (
            and 
             (equal? (match:value vcell) data)
             (succeed dictionary)
            )
            (succeed (match:bind variable data dictionary))
          )
        )
      )
    )
    element-match
  )