[Haskell-beginners] Re: map question
Deniz Dogan
deniz.a.m.dogan at gmail.com
Sun Oct 18 17:04:51 EDT 2009
2009/10/18 Will Ness <will_n48 at yahoo.com>:
> Deniz Dogan <deniz.a.m.dogan <at> gmail.com> writes:
>
>>
>> `This` syntax is used to make functions work infix, whereas operators
>> already are infix. For this reason, it wouldn't make much sense to use
>> `this` syntax (what's that called anyways?) on an operator.
>
> It would be a no-op in general, so nobody would use it.
>
>> `(-)` would in some sense be the same thing as just "-", since () is
>> used to make operators prefix and `` is used to make functions infix.
>
> exactly, just that it would be a _binary_ (-) .
>
So the only case where `(this)` syntax would be useful is where you
want to make GHC understand you mean the binary (-) operator and you
want to use point-free code. Now you have the choice between `(-)` and
subtract, which one will it be? :)
--
Deniz Dogan
More information about the Beginners
mailing list