FPSK: Composition or How to Write Code like Hemmingway
When Hemingway was alive he was widely acclaimed as one the greatest American artists. Besides being known for works such as A Farewell to Arms and *The Old Man and the Sea *, Hemingway became famous for his emphasis on concise prose.
Hemingway believed that his goal was to convey as much emotion as he could using the fewest amount of words. His emphasis on brevity is something that we as engineers should emulate in our code.
So how do we create great code with clarity? It all starts with functional composition. Functional Composition is about passing functions to one another to create more complex systems. From a mathematical standpoint think of composition as f(g(x)). Where x is some parameter we pass to g which is then passed to f.
But before we dive into how we can compose complex functions lets start with the building block, the function.
