Functional pipes pattern

Sometimes, when building an application, we face a large problem that requires complex calculations and data transformation. Using structured programming techniques, we can often break down the large problem into medium-sized problems and then break these down further into small-sized problems. When a problem is small enough, we can write functions to tackle each problem individually. 

Of course, these functions do not work in isolation it is more likely that the results of one function will feed into another function. In this section, we will explore the functional pipes pattern, which allows data to be passed seamlessly through a data pipeline. This is not uncommon in functional programming languages but is seen less in Julia. Nevertheless, we will take a look and see how it can be done.

First, we will go over a sample use case related to downloading recent Hacker News stories for analysis. Then, we will progressively refactor the code into using the functional pipes pattern. Let's go!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.158.148