2 Racket Essentials🔗
本章提供了对 Racket 的快速介绍,作为阅读本指南其余部分的背景知识。
有一些 Racket 经验的读者可以直接跳至 Built-In Datatypes。
2.1 Simple Values |
2.2 Simple Definitions and Expressions |
2.2.1 Definitions |
2.2.2 An Aside on Indenting Code |
2.2.3 Identifiers |
2.2.4 Definitions |
2.2.5 Conditionals with if, and, or, and cond |
2.2.6 Function Calls, Again |
2.2.7 Anonymous Functions with lambda |
2.2.8 Local Binding with
define, let, and let* |
2.3 Lists, Iteration, and Recursion |
2.3.1 Predefined List Loops |
2.3.2 List Iteration from Scratch |
2.3.3 Tail Recursion |
2.3.4 Recursion versus Iteration |
2.4 Pairs, Lists, and Racket Syntax |
2.4.1 Quoting Pairs and Symbols with quote |
2.4.2 Abbreviating quote with ' |
2.4.3 Lists and Racket Syntax |