J3RN :fedora: :elixir: :emacs: on Nostr: Hey #Haskell folks, I have a simple problem that I just can't sort out. I want a ...
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.
Published at
2024-12-02 21:35:43Event JSON
{
"id": "e7ac6267400898053e6a941325b6f21844048a8a98fdaf05b6cddd038ca31dc9",
"pubkey": "eebd14d82c7521a8a88dc84281fb4f1441ac71d0241f4e0dfa3f5058a1a076b0",
"created_at": 1733175343,
"kind": 1,
"tags": [
[
"t",
"haskell"
],
[
"proxy",
"https://fosstodon.org/users/j3rn/statuses/113585379312448257",
"activitypub"
]
],
"content": "Hey #Haskell folks, I have a simple problem that I just can't sort out.\n\nI want a point-free function that does a subtraction, then returns the absolute value of that.\n\nI wrote (abs . (-)) but that tries to apply abs to a partially applied (-). Anyways I'm stuck.",
"sig": "327d0df6bb707469fe556d4bb5a6a328038e329d3078c96023b356760fddd1b78c4d8d3bbfaa44c00239f98f182bd7bf5a712db0bb3413628f378e90370160c1"
}