Functional Programming - Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In functional programming languages, functions are the main building blocks. There are many requirements about how you define a function and what you can do with it. In return, you’re able to create programs that are easy to understand, debug, test, and expand, with no need to worry about concurrency issues.

Although Swift isn’t a functional programming language, its creators adopted many functional programming features. This lets you use functional programming practices to create code that’s easier to read and test, with less need for explicit thread-safety mechanisms.

Learning Objectives

You’ve already seen the functional programming higher-order functions map, filter, reduce, and sort. You learned how to use them with Swift collections in Programming in Swift: Functions & Types, where you learned the term “functional programming”. In this lesson, you’ll learn more about functional programming principles, and how you can apply them when writing Swift code:

See forum comments
Download course materials from Github
Previous: Lesson 2 Quiz Next: Functional Programming