Created
October 3, 2018 23:48
-
-
Save jbclements/436c422daec55d6db0fbd7cf43caabc4 to your computer and use it in GitHub Desktop.
code from the afternoon class, 2018-10-03
This file contains 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
#lang typed/racket | |
(require typed/rackunit) | |
(define-type Value String) | |
(define-type ExprC (U ConcatC StrC)) | |
(struct ConcatC ([l : ExprC] [r : ExprC]) | |
#:transparent) | |
(struct StrC ([s : String]) #:transparent) | |
(ConcatC (StrC "abc") (StrC "def")) | |
#;((check-equal? (interp (parse '"apple")) "apple") | |
(check-equal? (interp (parse '{"abc" + "def"})) | |
"abcdef")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment