Global Feed Post Login
Replying to Avatar J3RN :emacs: :haskell:

Hey #Haskell folks, I have a simple problem that I just can't sort out.

I want a point-free function that does a subtraction, then returns the absolute value of that.

I wrote (abs . (-)) but that tries to apply abs to a partially applied (-). Anyways I'm stuck.

Avatar
Mal Umbra 1y ago

curry (abs . uncurry (-))

?

Reply to this note

Please Login to reply.

Discussion

No replies yet.