On Sun, 2007-10-28 at 16:58 -0700, Andrew Lentvorski wrote:
> Christoph Maier wrote:
> > Of course, I have no idea how to do proramming, let alone functional
> > programming, properly,
> > but I'm using Mathematica all the time to look at data.
> > Usually I apply a chain of functions to the data to transform it to what
> > I need to see.
> > This is not how I would program an application, but for interactive data
> > analysis, it's my tool of choice.
>
> Actually, you are probably using "functional programming" far better
> than most so-called experts.
>
> Using "functional programming" on mathematical "functions" is a good map
> from problem domain to solution domain.
>
> -a
>
And then there's the problem of readability ...
what the *&^%$#@ did I program in Mathematica when I wrote
(and now need to try and make sense of)??!? :
Butterfly = Function[{line},
Block[{l = Length[line]},
{Plus @@ #,
Exp[(2 \[Pi] \[ImaginaryI])/l (Range[l/2] - 1)]
Subtract @@ #} &[Partition[line, l/2]]
]
]
SandeTukey =
Function[{vector},
Flatten[First[
Nest[Function[{v, n}, {Map[Butterfly, v, {n}],
n + 1}] @@ # &, {vector, 0}, Log[2, Length[vector]]]]]]
Confused,
Christoph
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg