Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct exp *e1, *e2, *e3;
- struct explist *l;
- e1 = mklet("y", mkconstant(10), mkvar("y"));
- l = NULL;
- l = cons(mkvar("y"), l);
- l = cons(e1, l);
- l = cons(mkvar("y"), l);
- e2 = mkopapp(isplus, l);
- e3 = mklet("y", mkconstant(2), e2);
- printf("%d\n", evalexp(e3) ); //should print 14
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement