-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
did some quick work on a few problems in section 4. Mostly pushing ju…
…st to make transfering work easier to computer at home
- Loading branch information
Jake McCrary
committed
Jun 28, 2010
1 parent
0e9a118
commit 3b9e3d6
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |