Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9196
| From | roby <roby.nowak@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: new functional operator |
| Date | 2012-03-22 10:51 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jkf08e$8ke$1@smc.vnet.net> (permalink) |
| References | <jjfd6e$7u7$1@smc.vnet.net> <jjpakk$ov1$1@smc.vnet.net> <jkcbme$qh6$1@smc.vnet.net> |
Hi Bobby
Well, if you remeber I was looking for a postfix style.
As such 5 out of your 6 suggestitions disqualify, the 6th one is the
"truly awful" original notation I was trying to replace.
Further I was looking for an operator form so again 3 out of 6
suggestitions disqualify.
Robert
On 21 Mrz., 11:48, DrMajorBob <btre...@austin.rr.com> wrote:
> Here SIX several equivalent expressions from (IMHO) most intuitive or
> readable to least:
>
> Composition[g, f] /@ {1, 2, 3, 4}
>
> {g[f[1]], g[f[2]], g[f[3]], g[f[4]]}
>
> g /@ f /@ {1, 2, 3, 4}
>
> {g[f[1]], g[f[2]], g[f[3]], g[f[4]]}
>
> Apply[Composition, {g, f}] /@ {1, 2, 3, 4}
>
> {g[f[1]], g[f[2]], g[f[3]], g[f[4]]}
>
> g@f@# & /@ {1, 2, 3, 4}
>
> {g[f[1]], g[f[2]], g[f[3]], g[f[4]]}
>
> Compose[g, f@#] & /@ {1, 2, 3, 4}
>
> {g[f[1]], g[f[2]], g[f[3]], g[f[4]]}
>
> {1, 2, 3, 4} // f /@ # & // g /@ # &
>
> {g[f[1]], g[f[2]], g[f[3]], g[f[4]]}
>
> The last is truly awful.
>
> Bobby
>
>
>
>
>
>
>
>
>
> On Tue, 20 Mar 2012 02:18:47 -0500, roby <roby.no...@gmail.com> wrote:
> >> That creates a information fog that makes *all* Mathematica code harder
> >> to understand, and Mathematica much harder to learn than it used to be.
>
> > {1, 2, 3, 4} /// f///g
>
> >> {1, 2, 3, 4} // f /@ # & // g /@ # &
>
> > sorry but I absolutly can't agree with your opinion in this case, the
> > former expression is more or less fogless and would be much easier to
> > understand.
> > The latter expression bears a lot of clutter.
>
> > Robert
>
> --
> DrMajor...@yahoo.com
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: new functional operator Bill Rowe <readnews@sbcglobal.net> - 2012-03-10 11:16 +0000
Re: new functional operator roby <roby.nowak@gmail.com> - 2012-03-14 05:34 +0000
Re: new functional operator John Doty <noqsiaerospace@gmail.com> - 2012-03-18 07:43 +0000
Re: new functional operator roby <roby.nowak@gmail.com> - 2012-03-20 07:19 +0000
Re: new functional operator John Doty <noqsiaerospace@gmail.com> - 2012-03-21 10:47 +0000
Re: new functional operator DrMajorBob <btreat1@austin.rr.com> - 2012-03-21 10:48 +0000
Re: new functional operator roby <roby.nowak@gmail.com> - 2012-03-22 10:51 +0000
Re: new functional operator Barrie Stokes <Barrie.Stokes@newcastle.edu.au> - 2012-03-22 10:54 +0000
Re: new functional operator roby <roby.nowak@gmail.com> - 2012-03-23 06:33 +0000
Re: new functional operator DrMajorBob <btreat1@austin.rr.com> - 2012-03-24 07:05 +0000
Re: new functional operator Ray Koopman <koopman@sfu.ca> - 2012-03-25 05:15 +0000
Re: new functional operator Barrie Stokes <Barrie.Stokes@newcastle.edu.au> - 2012-03-26 06:51 +0000
Re: new functional operator roby <roby.nowak@gmail.com> - 2012-03-28 09:57 +0000
csiph-web