diff options
-rw-r--r-- | docs/appendix-a.md | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/appendix-a.md b/docs/appendix-a.md index 15390f1..d1d8588 100644 --- a/docs/appendix-a.md +++ b/docs/appendix-a.md @@ -59,11 +59,14 @@ int main() { 重要的是理解即使*你*没有修改程序源代码或直接使用所有这些工具的能力,找到一个可以做到的人也是相对容易的。因此,有源代码的程序你就有权力去修改、修复、定制和学习编程——而如果得不到源代码就没有这些权力。源代码是让一个软件变*自由*的必要条件之一,而其他必要条件可从本书的哲学和理想中找到答案。 -[^1]: 对于其他的编程语言,比如 Scheme,通常不从 Hello World 程序开始入门。在 Scheme 中,你通常会从这样的程序开始: -```lisp -(define (factorial n) - (if (= n 0) - 1 - (* n (factorial (- n 1))))) -``` -这段程序是求一个数的阶乘;也就是运行`(factorial 5)`将会输出 120,即 5 乘以 4 乘以 3 乘以 2 乘以 1。 +[^1]: + 对于其他的编程语言,比如 Scheme,通常不从 Hello World 程序开始入门。在 Scheme 中,你通常会从这样的程序开始: + + ``` + (define (factorial n) + (if (= n 0) + 1 + (* n (factorial (- n 1))))) + ``` + + 这段程序是求一个数的阶乘;也就是运行`(factorial 5)`将会输出 120,即 5 乘以 4 乘以 3 乘以 2 乘以 1。 |