indentation and comments

master
Dustin Swan 3 years ago
parent 6ba33d1710
commit 041c8d8bbf
Signed by: dustinswan
GPG Key ID: AB49BD6B2B3A6377

@ -11,7 +11,7 @@
stack ; we've got an incomplete chunk. return the stack
(let ([x (first input)] [xs (rest input)]) ; grab the first element of the input
(if (member x opening) ; if it is an opening bracket
(go xs (cons x stack)) ; push it on the stack
(go xs (cons x stack)) ; push it on the stack and recurse
(let* ([y (first stack)] ; otherwise, it's a closing bracket. grab the top of the stack..
[matching (second (assoc y pairs))]) ; and find its matching closing bracket
(if (equal? matching x) ; if they match..

Loading…
Cancel
Save