I enjoyed this blog post from Blake Watson about a simple requirement and then going down the rabbit hole of functional programming to solve it in increasingly reusable, if mind-bending ways. By the end:
Creating a function that returns a function that returns a function can get a little trippy to think about. But what we’ve done is make our work reusable and flexible.
Blake admits he didn’t actually use the fully functional abstracted functional version. I vibe with that. Take it as far as you can without sacrificing clarity.