Skip to content

Commit

Permalink
did some quick work on a few problems in section 4. Mostly pushing ju…
Browse files Browse the repository at this point in the history
…st to make transfering work easier to computer at home
  • Loading branch information
Jake McCrary committed Jun 28, 2010
1 parent 0e9a118 commit 3b9e3d6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clojure/section4.3/src/ex4_35.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(ns ex4-35)

(defn an-integer-between [n z]
(if (> n z)
(amb)
(amb n (an-integer-between (inc n) z))))

Empty file.
11 changes: 11 additions & 0 deletions clojure/section4.3/src/ex4_47.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(ns ex4-37)

; My initial reaction is that Ben Bitdiddle's change
; does improve the efficiency.

; It seems to me that because the first 'require check is
; done earlier (only after i and j have been picked, k is still
; unpicked) that the work of chosing a k will not always be done.
; Not doing the work to pick k would cut down on the number of
; possibilities that need to be checked and hence cause an efficiency
; gain

0 comments on commit 3b9e3d6

Please sign in to comment.