Download Chapter 3: FUNCTION FUNDAMENTALS
This book is proof positive that there is only one way to learn Racket – the fun way. And author James Stelly’s lively guided tour through the features, functions and applications of this versatile programming language will make you a believer. Get introduced to a variety of coding paradigms, including iterative, object-oriented, and logic programming; become adept at creating interactive graphics, drawing diagrams, and generating puzzle solutions; and explore Racket through computer-science topics ranging from statistical analysis to search algorithms, the Turing machine, and more.
Early chapters will ground you in basic Racket concepts like data types, syntax, variables, strings, and producing formatted output. You’ll also grow comfortable performing recreational math in Racket’s rich numerical environment, and apply coding constructs to a variety of problem domains (like programming the moves needed to solve the Tower of Hanoi riddle). Later in the book, you’ll play with plotting, grapple with graphics, and visualize data; in the process, you’ll discover Racket’s extensive capability for visual representation. And finally, you’ll escape the confines of the command line to produce animations, interactive games, and a card-trick program that’ll dazzle your friends.
Along the way, you’ll learn about:
- DrRacket, an integrated development environment (IDE) for writing programs and making use of Racket’s features
- Sophisticated search algorithms for solving classical math problems, such as the Fibonacci sequence
- Generating two-dimensional function plots and using the Racket graphics toolkit to create complex drawings
- Importing and exporting data to and from Racket ports, and qualitative methods to analyze data using visualization techniques
- Programming simulated computing devices to perform tasks, including a Turing machine and a pushdown automaton
- Using Racket’s extensive libraries of built-in modules to build an interactive command-line calculator that can do complex math
Racket Programming the Fun Way is just like the language itself – it embodies all the things that make programming interesting and worthwhile, and it’ll make you a better programmer.