don't do redundant restarts

This commit is contained in:
mehbark 2025-04-28 18:02:41 -04:00
parent 8d7babec4d
commit ff84559e33

View file

@ -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)])