Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created February 16, 2017 19:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
let e = add [ cst(1)
, cst(2)
, mul [cst(0), var("x"), var("y")]
, mul [cst(1), var("y"), add [cst(2), var("x")]]
, add [cst(0), var("x") ]]
prn e
> "(+ 1 2 (* 0 x y) (* 1 y (+ 2 x)) (+ 0 x))"
prnInfix e
> "1 + 2 + (0) * (x) * (y) + (1) * (y) * (2 + x) + 0 + x"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment