# HG changeset patch # User Robert McIntyre # Date 1331203218 21600 # Node ID aaddd7b72a0e1e3a7dccae35a655123d1a8fd0bd # Parent 8a895ed4c0f966f8af3d6e13bd3ff39e33e801dd added optional argument to rewind diff -r 8a895ed4c0f9 -r aaddd7b72a0e clojure/com/aurellem/gb_driver.clj --- a/clojure/com/aurellem/gb_driver.clj Thu Mar 08 04:37:10 2012 -0600 +++ b/clojure/com/aurellem/gb_driver.clj Thu Mar 08 04:40:18 2012 -0600 @@ -88,7 +88,9 @@ (defn clear-history [] (reset! history {})) -(defn rewind [] (goto (dec @current-frame))) +(defn rewind + ([n] (goto (- @current-frame n))) + ([] (rewind 1))) (defn backup-state [frame] (swap! history #(assoc % frame (save-state))))