Skip to content

Instantly share code, notes, and snippets.

@jbclements
Created April 20, 2020 16:06
Show Gist options
  • Save jbclements/cd4680114affd54771b624dfb3418065 to your computer and use it in GitHub Desktop.
Save jbclements/cd4680114affd54771b624dfb3418065 to your computer and use it in GitHub Desktop.
#lang typed/racket
(require typed/rackunit)
(define-type PyExprC (U StrC StrAppC)) ;; imagine a bunch more stuff here...
(struct StrC ([s : String]) #:transparent)
(struct StrAppC ([l : PyExprC] [r : PyExprC]))
(define-type PyStmtC (U ReturnC)) ;; imagine a bunch more stuff here too...
(struct ReturnC ([val : PyExprC]) #:transparent)
#|
def f(x, y, z):
return x + z
def g(z):
return z + f("a","b","c")
g("y")
|#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment