don't do redundant restarts
This commit is contained in:
parent
8d7babec4d
commit
ff84559e33
1 changed files with 2 additions and 1 deletions
|
@ -64,7 +64,8 @@
|
|||
(cond
|
||||
[(undo? c) (undo!)]
|
||||
;; that's right, you can undo your restart
|
||||
[(restart? c) (push! init)]
|
||||
;; but don't if you're already at the beginning ofc
|
||||
[(restart? c) (unless (equal? init (car state-stack)) (push! init))]
|
||||
[(c->udlr c) => (lambda (c) (push! (step (car state-stack) c)))]
|
||||
[else (format #t "what does ~a even mean\r\n" c)])
|
||||
|
||||
|
|
Loading…
Reference in a new issue