|(require static-rename)||package: static-rename-lib|
(static-rename name-id expr)
Equivalent to expr, but adjusts the statically inferred name for expr so that (syntax-local-name) produces 'name-id while expanding expr. This allows adjusting the names of things like procedures, which infer their runtime names based on static information. Unlike procedure-rename, however, static-rename does not introduce any additional runtime cost.
For more information, see Inferred Value Names.
> (define f (λ (x) x)) > f
> (define g (static-rename renamed (λ (x) x))) > g
(define/renamed name-id id expr)
(define/renamed name-id (head args) body ...+)
head = id | (head args) args = arg ... | arg ... . rest-id arg = arg-id | [arg-id default-expr] | keyword arg-id | keyword [arg-id default-expr]
Defines a binding, just like define, but expr is statically renamed using static-rename. Also like define, define/renamed is a shorthand form for defining a function, which will use name-id for the runtime name produced by object-name.