[racket] Scoped require
50 minutes ago, Maxim Romashchenko wrote:
>
> --- my-module.rkt ---
> #lang racket
> (provide my-begin)
>
> (define foo
> ...
> ---------------------
You could do this:
#lang racket
(provide (rename-out [begin my-begin]))
and get what you want,
> --- main.rkt ---
> #lang racket
> (require "my-module.rkt")
>
> (my-begin
> (foo
> ...
> -----------------
but it's probably easier to do this instead here:
#lang racket
(require (rename-in racket [begin my-begin]))
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!