Skip to content

Commit

Permalink
Generate the actual expressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fffej committed Feb 17, 2009
1 parent 507c064 commit 9a33d16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions countdown.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(:use clojure.contrib.combinatorics)
(:use clojure.contrib.seq-utils))

(def *operators* [+ - / *])
(def *operators* ['+ '- '/ '*])

(defn is-valid [op a b]
(cond
Expand All @@ -17,7 +17,7 @@
(defn expr
"A list of expressions for a and b"
[a b]
(map (fn [x] (x a b)) *operators*))
(map (fn [x] (list x a b)) *operators*))

(defn expressions-helper
"Given a lst, build up all valid Countdown expressions"
Expand Down

0 comments on commit 9a33d16

Please sign in to comment.