Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Through[Divide[f1, f2][x]]
Replies: 3   Last Post: May 28, 2013 3:48 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ray Koopman

Posts: 3,383
Registered: 12/7/04
Re: Through[Divide[f1, f2][x]]
Posted: May 28, 2013 3:48 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Sun, May 26, 2013 @ 11:23 AM, Andrzej Kozlowski <akozlowski@gmail.com> wrote:
> On 26 May 2013, at 11:06, Ray Koopman <koopman@sfu.ca> wrote:
>

>> Either of these will give you f1[x]/f2[x]:
>>
>> Divide@@{f1@#,f2@#}&@x
>>
>> Divide@@(#@x&)/@{f1,f2}
>>
>> Sometimes it would be nice to have a "reverse map", that
>> applied each of a list of functions to a single argument,
>> instead of a single function to each of a list of arguments.

>
> I am not sure I understand what you mean. Why doesn't Through do that?
>
> Through[{f, g, h}[x]]
>
> {f[x], g[x], h[x]}
>
> Andrzej Kozlowski


Through does do that. When I saw Bob's response to the original post
I asked myself "How did I miss that?" I thought I had tried it and
found that it didn't work. The only explanation I can think of is
that I had the "reverse map" metaphor fixed too firmly in my mind,
to the point that I used Map-like syntax [{f1,f2},x] instead of
[{f1,f2}@x].




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.