summaryrefslogtreecommitdiffstats
path: root/books/Seasoned Schemer
blob: ed2a3fba4922b42fad8741875f7b710f44c858d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
============================
The Seasoned Schemer
============================

:by: Daniel Friedman and Matthias Felleisen 
:Edition: First (1st) 

See also `Scheme </k/software/scheme/>`__.

This book is a sequel `The Little Schemer`_; 
The Reasoned Schemer is a paralel exploration of logical programming.

.. _The Little Schemer: /k/books/littleschemer/

Issues/Omissions 
--------------------------
The Y combinator function is never defined in this book, I had to copy it out of 
`The Little Schemer`_; 

    (define Y
      (lambda (thing)
        ((lambda (le)
           ((lambda (f) (f f))
            (lambda (f) (le (lambda (x) ((f f) x))))))
         thing)))

MIT/GNU Scheme doesn't seem to have ``letcc`` or ``try``; I stuck with
``call-with-current-continuation``:

    (call-with-current-continuation (lambda (hook) ...)
    ; is the same as
    (letcc hook (...))

    ; as noted in the book (p. 89)
    (try x a b)
    ; is the same as
    (letcc success 
      (letcc x 
        (success a)) 
      b)
    ; is the same as
    (call-with-current-continuation 
      (lambda (success)
        (begin
          (call-with-current-continuation
            (lambda (x)
              (success a)))
          b)))


The Next 10 Commandments
--------------------------
TODO