Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Functions, Part 1

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg576] Re: [mg564] Functions, Part 1
  • From: villegas (Robert Villegas)
  • Date: Mon, 20 Mar 1995 03:28:17 -0600

Jack,

I just thought of another possibility here:


> 	In trying to understand all the differences between
> f[]  and  Function[]  I ran across something which puzzles me.
> Consider the following:
> 

> (1)	f[x_] := x + 1
> 

> (2) 	g = Function[x,f[x]]
> 

> (3)	h = Function[x,Function[y,y+1]]
> 

> Now  g[2]  and  f[2]  output  3  as expected.  But 

> h[2] (indeed, h[garbage]) outputs  Function[y,y+1].  What`s going on?


Since you said you're comparing f and Function, maybe (2) and (3) are
supposed to use f and Function[y, y + 1] in exactly the same way, with
an argument x?  If so, then maybe this will do what you want it to:

In[17]:= Function[x, Function[y, y + 1][x] ][3]

Out[17]= 4


This might be off base, but it's a possibility...

Robby


  • Prev by Date: Re: how to pick out alternating columns and rows in a matrix?
  • Next by Date: Re: Functions, Part 1
  • Previous by thread: Re: Functions, Part 1
  • Next by thread: Re: Functions, Part 1