(import brev mdg) (define true #t) (define false #f) (define game-running true) (define (menu msg) (print msg)) (define start-game "start game") (define game-over "game over") ; (define (listner game-running) ; (display " > ") ; (define user-input (read)) ; (if (string=? user-input "quit") ; (set! game-running false) ; (print user-input)) ; game-running) ; (let loop () ; (if (eqv? game-running true) ; (listner game-running)) ; (loop)) (define-syntax while (syntax-rules () ((while cond body ...) (let loop () (when cond body ... (loop)))))) (let ((str "PENCHANT") (i 0)) (while (< i (string-length str)) (print (string-ref str i)) (set! i (add1 i))))