Using namespaces to work with shadowed identifiers
namespaces, racket, random, scheme
Solution
You can use `prefix-in` to prefix the exports of the standard library with some namespacing prefix. For example:
#lang racket
(require (prefix-in std:: racket))
(define (* x)
(std::* x x))
shows that we can shadow the bindings from `#lang racket`, but still get at them through the prefixed identifiers.
Traditionally, the prefixes that people use are a little simpler, like:
#lang racket
(require (prefix-in r: racket))
(define (* x)
(r:* x x))
Problem
I'm working on a simple game using Racket (homework assignment). The requirements instruct me to create a computer player named random which utilizes the default random number generator. This snippet of code illustrates my issue: ``` (define (random) (random (10))) ; should be random number call ``` I'm used to the C convention for namespaces: ``` std::string ``` Does Racket offer anything along those lines? Thanks