Maybe this should be in #random as it’s a random thought but it’s also kind of engineering related. I did some further FP reading over the past few weeks about Kleisli categories and extra composition tidbits. They’re literally amazing and totally make sense for chaining together a bunch of transformations/actions but also abstracting things like logging/audits/messages to maintain separation of concerns.
One common pattern is to do something like the following when logging - this happens probably in 90% of business apps:
log = ""
def add_four(number):
log += "Added four\n"
return number + 4