Skip to Main Content
Realm of Racket
book

Realm of Racket

by Conrad Barski M.D., David Van Horn, Eight Students of Northeastern University, Matthias Felleisen
June 2013
Intermediate to advanced content levelIntermediate to advanced
312 pages
6h 47m
English
No Starch Press
Content preview from Realm of Racket

Chapter 4½. (define define ’define)

#|

So far, we have covered the basics of defining variables and functions. Did you wonder if there was more to it? In this chapter, we will show you everything you need to know about definitions.

|#

4½.1 Module-Level Definitions

The most common kind of definitions are module-level definitions. These introduce names that can be accessed anywhere in the module. For now, think of a module as the definitions panel. There are two kinds of module-level definitions: variable definitions and function definitions.

Variable Definitions

Let’s begin with variable definitions. Suppose we were to develop a graphical version of the Guess My Number game from Chapter 2 that displays its results on a window of some fixed size. The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Elm in Action

Elm in Action

Richard Feldman
Handbook of Constraint Programming

Handbook of Constraint Programming

Francesca Rossi, Peter van Beek, Toby Walsh

Publisher Resources

ISBN: 9781457185120Errata