From 5cdd03cd97a107537f3bf154c97ea82d5c46ca02 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 26 Jan 2019 16:32:47 -0500 Subject: sicp.org: Add Ex. 2.24. --- sicp.org | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/sicp.org b/sicp.org index 54d4343..a2ee7fe 100644 --- a/sicp.org +++ b/sicp.org @@ -471,3 +471,46 @@ creates a list with the squared numbers in a messy nested list like: (square-list '(1 2 3 4 5)) ;; $3 = (((((() . 1) . 4) . 9) . 16) . 25) #+END_SRC +*** 24 +#+BEGIN_EXAMPLE +(1 (2 (3 4))) + + + +----+----+ +----+----+ +----+----+ +----+----+ + | o | o--|----->| o | o--|----->| o | o--|----->| o | / | + +----+----+ +----+----+ +----+----+ +----+----+ + | | | | + | | | | + v v v v + +----+ +----+ +----+ +----+ + | 1 | | 2 | | 3 | | 4 | + +----+ +----+ +----+ +----+ + + + (1 (2 (3 4))) + o + / \ + / \ + / \ + / \ + / \ + 1 \ + \ (2 (3 4)) + o + / \ + / \ + / \ + / \ + / \ + / \ + 2 \ + \ (3 4) + o + / \ + / \ + / \ + / \ + / \ + / \ + 3 4 +#+END_EXAMPLE -- cgit v1.2.3