[Date Index] [Thread Index] [Author Index]
Re: Functions, Part 1
> (1) f[x_] := x + 1 > > (2) g = Function[x,f[x]] > > (3) h = Function[x,Function[y,y+1]] > > Now g and f output 3 as expected. But > h (indeed, h[garbage]) outputs Function[y,y+1]. > What`s going on? You for got the x in the definition of h. You want: h = Function[x,Function[y,y+1][x]] Now h=3.