Welcome to the CHICKEN Scheme pasting service

dimension error added by klgg on Mon Oct 22 10:30:03 2012

(define-syntax bitstring-constructor
  (syntax-rules (else ->)
    ;; constructing syntax
    ((_ ("secret" "constructing" return))
      (abort (list 'bitstring-match-failure)))
    ((_ ("secret" "constructing" return) (else expression))
      (return expression))
    ((_ ("secret" "constructing" return) (pattern ...) rest ...)
      (or
      	(let ((stream (bitstring-create)))
      	  ;(print "group: " `(pattern ...))
      	  (bitstring-pattern ("secret" "constructing" stream (return stream)) pattern ...))
      	(bitstring-constructor ("secret" "constructing" return) rest ...)))
    ;; matching syntax
    ((_ ("secret" "matching" value return))
      (abort (list 'bitstring-match-failure)))
    ((_ ("secret" "matching" value return) (else expression))
      (return expression))
    ((_ ("secret" "matching" value return) (pattern ... -> expression) rest ...)
      ; short form
      (bitstring-constructor
      	("secret" "matching" value return) ((pattern ...) expression) rest ...))
    ((_ ("secret" "matching" value return) ((pattern ...) expression ...) rest ...)
      (or
      	(let ((stream (bitstring-of-any value)))
      	  ;(print "group: " `(pattern ...))
      	  (bitstring-pattern ("secret" "matching" stream (return expression)) pattern ...))
      	(bitstring-constructor ("secret" "matching" value return) rest ...)))))
ue return) rest ...)))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the operator to construct procedures?
Visually impaired? Let me spell it for you (wav file) download WAV