projects
/
adventofcode2019.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60ac986
)
Fixed day2/pt1 bug
author
Jack Kinsey
<kinsey_john@bah.com>
Mon, 2 Dec 2019 15:54:20 +0000
(10:54 -0500)
committer
Jack Kinsey
<kinsey_john@bah.com>
Mon, 2 Dec 2019 15:54:20 +0000
(10:54 -0500)
day02/intcode.clj
patch
|
blob
|
blame
|
history
diff --git
a/day02/intcode.clj
b/day02/intcode.clj
index f6e56660c64f14ac4c80c663595b66fb890e1b02..b21ffd2588dd456722d9e17cadfc0910204d498c 100644
(file)
--- a/
day02/intcode.clj
+++ b/
day02/intcode.clj
@@
-14,9
+14,9
@@
snd-val (program snd)]
(assoc program thd (opcode-fn fst-val snd-val))))
-(defn intcode [program
counter
]
+(defn intcode [program]
(loop [program program
- counter
counter
]
+ counter
0
]
(let [opcode (program counter)]
(if (= opcode 99)
program