<div dir="ltr">Yes, you can do that, but you probably shouldn&#39;t.<div><br></div><div>See also:</div><div><a href="http://www.haskell.org/haskellwiki/Num_instance_for_functions">http://www.haskell.org/haskellwiki/Num_instance_for_functions</a><br>
</div><div><a href="http://hackage.haskell.org/package/applicative-numbers">http://hackage.haskell.org/package/applicative-numbers</a><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Aug 31, 2013 at 10:01 PM, Christopher Howard <span dir="ltr">&lt;<a href="mailto:christopher.howard@frigidcode.com" target="_blank">christopher.howard@frigidcode.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi. I was just curious about something. In one of my math textbooks I see expressions like this<br>
<br>
f + g<br>
<br>
or<br>
<br>
(f + g)(a)<br>
<br>
where f and g are functions. What is meant is<br>
<br>
f(a) + g(a)<br>
<br>
Is there a way in Haskell you can make use of syntax like that (i.e., expressions like f + g and f * g to create a new function), perhaps by loading a module or something?<br>
<br>
______________________________<u></u>_________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>