Given the following scheme, with the cursor indicated as ^
(define (shunting-yard expr)
(let loop ([expr (string->list expr)]
[opstack '()]
[result '()])
(if (null? expr)
(unshunt opstack result) ; jumps back to here
(let ([head (car expr)]
[tail (cdr expr)])
(cond
[(not (operator? head))
(loop tail opstack (cons head result))]
[(to-shunt? opstack head)
(loop expr (cdr opstack) (cons (car opstack) result))]
[else
(loop tail (cons head opstack) result)])))))
;^
There is no distinction made with the cursor on the closing paren of a form, as on the opening. As above, 'B' jumps the cursor to the prior overall form, skipping every intermediate form.
Given the following scheme, with the cursor indicated as
^There is no distinction made with the cursor on the closing paren of a form, as on the opening. As above, 'B' jumps the cursor to the prior overall form, skipping every intermediate form.