 
 (last-pair (list 23 72 149 34))
 
+(defn last-pair' [pair]
+  (if (nil? (cdr pair))
+    pair
+    (recur (cdr pair))))
+
 ;; Exercise 2.18
 (defn reverse' [coll]
   (letfn [(rev [coll acc]

    (rev coll [])))

(reverse' (list 1 4 9 16 25))

;; Exercise 2.19
(def us-coins (list 50 25 10 5 1))

(ns sicp.chapter2.2-1
  (:require [sicp.common.list :refer :all]))

;;;; 2.2  Hierarchical Data and the Closure Property

