正在加载图片...
Free and bound variables 入x.X+ Bound variable can be renamed(placeholder") nx. x+y is same function as z (z+y a-equivalence (X+y) is the scope of the binding nX Name of free variable does matter nx.X+y is not the same as ix(x+z · Occurrences intx=10: (x.X+y)(x+1): has bot int add(int x)i return x+y; a free and a bound occurrence add(x+1);Free and bound variables • x. x + y • Bound variable can be renamed (“placeholder”) • x. (x+y) is same function as z. (z+y) -equivalence • (x+y) is the scope of the binding x • Name of free variable does matter • x. (x+y) is not the same as x. (x+z) • Occurrences • (x. x+y) (x+1) : x has both a free and a bound occurrence int x = 10; int add(int x) { return x+y;} add(x+1);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有