Re:Currying in JavaScript
by BiteCode_dev on Sunday September 19, 2021 @10:01AM
(#28584374)
Excuses accepted. Imperative Python would really look like:
try:
return sendEmail(user.email for user in users)
except IsError:
Error("Error sending emails") # if it does something
I agree FP pipelines are nice, but not everything needs it.
For what it's worth, your example doesn't map 1-to-1 to the intention of what I wrote. Doing it in a more imperative style, I'd have to write
(excuse my pseudo Python)