Immediate versus Delayed Assignments

f[x_]=x^2+1

f[x]=x^2+1

--------------------------------------

f[x_]:=x^2+1

 

 

***************************

The differences of the two is the previous is evaluate first

That is the RHS is evaluate first then assign it the LHS

but the later assignment is lazy which is say the equation is

evaluate when at the specific time before it just the symble equation

posted @ 2012-06-26 13:07  geometry_  阅读(121)  评论(0编辑  收藏  举报