2 ms·
I instead find that when using functional languages the code begs you to go in a small, tiny function. It makes the intent much more clear about what that code
by tigershark 7y ago
I instead find that when using functional languages the code begs you to go in a small, tiny function.
It makes the intent much more clear about what that code is doing and 99% of the time you don’t need to know how is doing it.
Obviously if that code is used only once then it doesn’t make sense to extract it, but I find out that small pure functions are really composable, powerful and reusable.
Maybe the best example is the pipe operator definition in F#:
let (|>) x f = f x
It’s extremely simple, extremely powerful and it’s used pretty much everywhere.