Functional programming in data engineering with Python — part 1

<p>This is an introduction to a series on functional programming in data engineering using Python. Here I lay out some of the fundamental concepts and tools found in functional programming using Python code.</p> <h1>What is functional programming?</h1> <p>Functional programming is a declarative type of programming used to build bug-resistant programs and applications through the use of functions.</p> <p>In other words, it&rsquo;s a computing paradigm that emphasizes the use of pure functions and immutable data structures for mitigating side effects instead of specifying the steps on how to perform tasks (imperative programming).</p> <h1>What is a function?</h1> <p>A function is an object that turns inputs into outputs.</p> <p>You can have functions that perform simple operations where they simply convert inputs to outputs. You can also have more sophisticated functions that are linked with other functions in a complex system. In such cases, functions can be:</p> <ul> <li>An input (parameter for another function)</li> <li>An output (result from another function)</li> </ul> <p>Also, functions:</p> <ul> <li>are treated as first-class citizens (<strong>first-class functions</strong>)</li> <li>can be passed into other functions as arguments or returned from other functions (<strong>higher-order functions</strong>)</li> <li>can be connected with other functions to form new ones (<strong>function composition</strong>)</li> <li>should be designed to work with other functions (<strong>reusability</strong>)</li> </ul> <p><a href="https://blog.det.life/functional-programming-in-data-engineering-with-python-part-1-c2c4f677f749">Read More</a>&nbsp;</p>