<br><br><div><span class="gmail_quote">On 2/21/07, <b class="gmail_sendername">Henning Thielemann</b> &lt;<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>On Tue, 20 Feb 2007 <a href="mailto:apfelmus@quantentunnel.de">apfelmus@quantentunnel.de</a> wrote:<br><br>&gt; Paul Moore wrote:<br>&gt; &gt; I&#39;m after a function, sort of equivalent to map, but rather than<br>&gt; &gt; mapping a function over a list of arguments, I want to map a list of
<br>&gt; &gt; functions over the same argument. </blockquote></div><br>
Well this is not very sexy, no monads or anything, but I kinda believe in Keep It Simple:<br>
<br>
Prelude&gt; let revApply a f = f a<br>
Prelude&gt; let rMap a fs = map (revApply a) fs<br>
Prelude&gt; rMap 2 [(*4),(^2),(+12),(**0.5)]<br>
[8.0,4.0,14.0,1.4142135623730951]<br>
<br>
oh and I REALLY enjoyed the discussions that this spawned about things
monadic, as there was some really slick stuff in there... The little
thing about &#39;join&#39; and etcetera... really good stuff.<br>
cheers... <br>
gene<br>