Re:Functional programming jargon in plain English
by lgas on Monday July 04, 2022 @04:11PM
(#31981267)
Is this what you mean?
let f = makeMap x y
in map someFunc . filter other . map f $ userList
I suspect not as it certainly doesn't seem to improve the situation. Perhaps you could elaborate?
Edit to add: I was focused on the "write out the callback given to map using a let block" part and not the meaningful name part, but that's perhaps what's confusing about this to me, as (makeMap x y) seems like the most clear name possible here, what else could you do? This?
let mapOfXy = makeMap x y
in map someFunc . filter other . map mapOfXy $ userList
Edit to add: I was focused on the "write out the callback given to map using a let block" part and not the meaningful name part, but that's perhaps what's confusing about this to me, as (makeMap x y) seems like the most clear name possible here, what else could you do? This?
It only obscures things.