This file contains hidden or 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
| (def inputs [...]) | |
| (def day2_2_sought 42) | |
| (defn computer [data ip] | |
| (let [[op oa1 oa2 t] (subvec data ip) | |
| o1 (data oa1) | |
| o2 (data oa2) | |
| ofn ({1 + 2 * 99 :hlt} op)] | |
| (if (= :hlt ofn) (data 0) (recur (assoc data t (ofn o1 o2)) (+ 4 ip))))) |