# Realm of Racket, chapter 2

**URL:** <https://racket.discourse.group/t/realm-of-racket-chapter-2/2679>\
**Category:** General\
**Tags:** drracket\
**Created:** [January 25, 2024, 3:54pm UTC](https://racket.discourse.group/t/realm-of-racket-chapter-2/2679 "2024-01-25T15:54:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartoffel](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/kartoffel/32/1620_2.png) [@Kartoffel](https://racket.discourse.group/u/Kartoffel)\
**Post date:** [January 25, 2024, 3:54pm UTC](https://racket.discourse.group/t/realm-of-racket-chapter-2/2679/1 "2024-01-25T15:54:40Z")

</div>

Hello.  
In order to make a better version of the Program "Guess my number", I have begun to splitt the program into two parts, as you see here:

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/3/3c8db62fbc71eff523094ea4f382b25b43f3fbd3.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/4/4df6e888338cad7b6da61fb7ae05ea73a7b1ec8e.png)

As you see, I have to define someway the "variables" variable. Is this the only way to link the two parts of the program or do you have _a second, more elegant way to do that_? Otherwise Dr Racket complains that "variables" is not defined.. I mean, is there a way to use open and close _so that the compiler understands that under "variables" I mean "upper" AND "lower"?_

---

<div class="post-metadata">

**Author:** ![EmEf](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@EmEf](https://racket.discourse.group/u/EmEf)\
**Post date:** [January 25, 2024, 4:07pm UTC](https://racket.discourse.group/t/realm-of-racket-chapter-2/2679/2 "2024-01-25T16:07:20Z")

</div>

Delete `(provide variables)`.  
Delete `(define variables null)`.

There’s no need for these lines.

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [January 25, 2024, 4:12pm UTC](https://racket.discourse.group/t/realm-of-racket-chapter-2/2679/3 "2024-01-25T16:12:22Z")

</div>

I am not 100% sure what you are looking for, but you can write:

```scheme
(provide lower upper)

```

Or if you don't want to explicitly list all identifiers:

```scheme
(provide (all-defined-out))

```

The downside of `all-defined-out` is that all functions and variables are exported,  
also variables and functions only relevant to the module.
