Skip to content

Commit

Permalink
Merge pull request #211 from erp12/master
Browse files Browse the repository at this point in the history
Changed some let definitions so they no longer mask clojure functions
lein release :minor
  • Loading branch information
lspector committed Jul 27, 2016
2 parents 8d11809 + cf22dd8 commit f069bb6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/clojush/instructions/common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@
[type]
(fn [state]
(if (not (empty? (rest (rest (type state)))))
(let [first (stack-ref type 0 state)
second (stack-ref type 1 state)
third (stack-ref type 2 state)]
(let [first-item (stack-ref type 0 state)
second-item (stack-ref type 1 state)
third-item (stack-ref type 2 state)]
(->> (pop-item type state)
(pop-item type)
(pop-item type)
(push-item second type)
(push-item first type)
(push-item third type)))
(push-item second-item type)
(push-item first-item type)
(push-item third-item type)))
state)))

(define-registered exec_rot (with-meta (rotter :exec) {:stack-types [:exec] :parentheses 3}))
Expand Down Expand Up @@ -118,11 +118,11 @@
[type]
(fn [state]
(if (not (empty? (rest (type state))))
(let [first (stack-ref type 0 state)
second (stack-ref type 1 state)]
(let [first-item (stack-ref type 0 state)
second-item (stack-ref type 1 state)]
(->> (pop-item type state)
(pop-item type)
(push-item (= first second) :boolean)))
(push-item (= first-item second-item) :boolean)))
state)))

(define-registered exec_eq (with-meta (eqer :exec) {:stack-types [:exec :boolean] :parentheses 0}))
Expand Down

0 comments on commit f069bb6

Please sign in to comment.