[Haskell-cafe] Re: Re-order type (flip map)
Luke Palmer
lrpalmer at gmail.com
Sun Oct 10 21:18:19 EDT 2010
On Sun, Oct 10, 2010 at 4:47 PM, Ozgur Akgun <ozgurakgun at gmail.com> wrote:
>
> On 10 October 2010 22:32, Johannes Waldmann <waldmann at imn.htwk-leipzig.de>
> wrote:
>>
>> Oh, and while we're at it - are there standard notations
>> for "forward" function composition and application?
>>
>> I mean instead of h . g . f $ x
>> I'd sometimes prefer x ? f ? g ? h
>> but what are the "?"
>
> While asking you use the same symbol for function composition, and something
> like inverse function application. I don't think there exists an operator ?,
> such that h . g . f $ x is equivalent to x ? f ? g ? h.
infixl 9 ?
x ? f = f x
h . g . f $ x
= h (g (f x))
= h (g (x ? f))
= h (x ? f ? g)
= x ? f ? g ? h
Luke
More information about the Haskell-Cafe
mailing list