Book Image

Functional Programming in Python [Video]

By : Sebastiaan Mathôt
Book Image

Functional Programming in Python [Video]

By: Sebastiaan Mathôt

Overview of this book

<p><span id="description" class="sugar_field">Functional programming is a style of programming that is characterized by short functions, lack of statements, and little reliance on variables. You will learn what functional programming is, and how you can apply functional programming in Python.</span></p> <p><span id="description" class="sugar_field">In this video course, we will learn what functional programming is, and how it differs from other programming styles, such as procedural and object-oriented programming. We will also learn why and when functional programming is useful, and why and when it makes programs unnecessarily complex. Then we go on to explore lambda expressions, which are short one-line functions, and are the purest form of functional programming that Python offers. Next, we will learn about higher-order functions: functions that accept other functions as argument, or return other functions as return values. In Python, higher-order functions are elegantly supported through decorators. We will also encounter important concepts from functional programming, such as monads, currying, statelessness, side-effects, memoization, and referential transparency; these concepts may initially seem odd to Python programmers, but we will see how they are elegantly supported by the language. In fact, many Python programmers already make use of concepts from functional programming without being aware of doing so.</span></p> <p><span id="description" class="sugar_field">All the videos in this course contain hands-on examples of the introduced concepts. We will also consider several different implementations of an interactive calculator to illustrate how you can use functional programming in a simple-but-complete program.</span></p> <h2><span class="sugar_field">Style and Approach</span></h2> <p><span class="sugar_field"><span id="trade_selling_points_c" class="sugar_field">This is a hands-on course where each video starts by introducing a topic, followed by short, practical examples; some contain more elaborate examples to demonstrate how all the concepts learned so far can be applied in a realistic project.</span></span></p>
Table of Contents (5 chapters)
Chapter 2
Lambda Expressions or Nameless Functions
Content Locked
Section 3
Understanding ‘and’ and ‘or’
In this video, we will take a closer look at ‘and’ and ‘or’. - View how ‘and’ and ‘or’ operators work formally - Consider how operators can be used to control flow - Consider when (not) to use operators