Re: a strange line of code
- To: mathgroup at smc.vnet.net
- Subject: [mg52737] Re: [mg52710] a strange line of code
- From: "Caffa Vittorio Dr." <Caffa at iabg.de>
- Date: Sat, 11 Dec 2004 05:21:53 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Try this:
In[1]:= f[x]
Out[1]= f[x]
In[2]:= f@x
Out[2]= f[x]
In[3]:= x//f
Out[3]= f[x]
In[4]:= ?#
# represents the first argument supplied to a pure function. #n
represents the nth argument.
In[5]:= ?&
Function[body] or body& is a pure function. The formal parameters are #
(or #1), #2, etc. Function[x, body] is a pure function with a single
formal parameter x. Function[{x1, x2, ... }, body] is a pure function
with a list of formal parameters.
Cheers, Vittorio
-----Original Message-----
From: Stefan Schuster
To: mathgroup at smc.vnet.net
[mailto:bi1169*delete_from_star_to_star* at fh-weihenstephan.de]
Subject: [mg52737] [mg52710] a strange line of code
Hello,
in a notebook, I found and function to calculate the Feigenbaum
bifurcation Diagram.
I principial understand the Feigenbaum, and I think I'm also able to
write such an funcion by myself, but not in this compact way.
Can someone please explain me the meaning of the Symbols #, @ and &
Here is the Code:
Feigenbaum = Compile[{{
?, _Real}}, ({?, #} &) /@ Union[Drop[NestList[
? # (1 - #) &, 0.2, 300], 100]]];
thanks in advance
Stefan