You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
255 B
Racket
14 lines
255 B
Racket
11 years ago
|
#lang racket
|
||
|
|
||
|
(provide bound/c (rename-out (top~ #%top)))
|
||
|
|
||
|
(define-syntax-rule (top~ . id)
|
||
|
(λ x `(id ,@x)))
|
||
|
|
||
|
(define-syntax (bound/c stx)
|
||
|
(syntax-case stx ()
|
||
|
[(_ x)
|
||
|
(if (identifier-binding #'x )
|
||
|
#'x
|
||
|
#'(#%top . x))]))
|