]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex2_26.clj
Solution to 4.33. This had been difficult to get right, though conceptually it was
[sicp.git] / src / sicp / ex2_26.clj
1 (ns sicp.ex2_26)
2
3 (def x (list 1 2 3))
4 (def y (list 4 5 6))
5
6 ;; (append x y) will produce (1 2 3 4 5 6)
7 ;; (cons x y) will produce ((1 2 3) 4 5 6)
8 ;; (lis x y) => ((1 2 3) (4 5 6))
9
10 (concat x y)
11 ;;=> (1 2 3 4 5 6)
12 (cons x y)
13 ;;=> ((1 2 3) 4 5 6)
14 (list x y)
15 ;;=> ((1 2 3) (4 5 6))