Re: new functional operator
- To: mathgroup at smc.vnet.net
- Subject: [mg125620] Re: new functional operator
- From: roby <roby.nowak at gmail.com>
- Date: Thu, 22 Mar 2012 05:50:05 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- 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... at 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... at 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... at yahoo.com