正在加载图片...
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 int y=10 int y =10; int z=20 int z=20: int add(int x)i return x+y: 1 int add(int x)( return x+Z;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) int y = 10; int z = 20; int add(int x) { return x + y; } int y = 10; int z = 20; int add(int x) { return x + z; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有