[Haskell-cafe] function arithmetic?
Roman Cheplyaka
roma at ro-che.info
Sun Sep 1 08:53:03 CEST 2013
* Christopher Howard <christopher.howard at frigidcode.com> [2013-08-31 21:01:38-0800]
> Hi. I was just curious about something. In one of my math textbooks I
> see expressions like this
>
> f + g
>
> or
>
> (f + g)(a)
>
> where f and g are functions. What is meant is
>
> f(a) + g(a)
>
> 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?
Not the syntax, but the notion itself corresponds exactly to idiom
brackets/applicative functors. In this case it's the Reader applicative.
Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130901/500f8677/attachment.pgp>
More information about the Haskell-Cafe
mailing list