Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 9d3fdec556
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.509 kB
#lang scheme/base
;; Note: this is eventually going to go into LeftParen itself.
(provide define-mode)
(define-syntax define-mode
(syntax-rules ()
((_ mode-invoker-name mode-predicate-name)
(begin (define param (make-parameter #f))
(define-syntax mode-invoker-name
(syntax-rules ()
((_ body (... ...))
(parameterize ((param #t))
body (... ...)))))
(define (mode-predicate-name)
(param))))))
Jump to Line
Something went wrong with that request. Please try again.