Created
July 5, 2019 17:08
-
-
Save cpcloud/8ee150a1fa2a0e8e09ee912aebb34212 to your computer and use it in GitHub Desktop.
wat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (term? expr) | |
(or (symbol? expr) (number? expr))) | |
(define/match (expr? expr) | |
[((list (or '+ '- '*) (? expr?) ...)) #t] | |
[((? term?)) #t] | |
[(_) #f]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment