I believe you want the conveniently-named subtract function, which exists for exactly the reason you've discovered:
subtract :: Num a => a -> a -> a
the same as flip (-)
.
Because -
is treated specially in the Haskell grammar, (- e)
is not a section, but an application of prefix negation. However, (subtract exp)
is equivalent to the disallowed section.
If you wanted to write it pointfree without using a function like subtract
, you could use flip (-)
, as the Prelude
documentation mentions. But that's... kinda ugly.