An open API service indexing awesome lists of open source software.

https://github.com/packtpublishing/swift-functional-programming

Code repository for Swift Functional Programming
https://github.com/packtpublishing/swift-functional-programming

fp functional-programming functional-reactive-programming ios ios-app ios-swift object-oriented-programming oop protocol-oriented-programming swift swift-language vapor-swift

Last synced: 6 months ago
JSON representation

Code repository for Swift Functional Programming

Awesome Lists containing this project

README

          

# Swift Functional Programming - Second Edition
This is the code repository for [Swift Functional Programming - Second Edition](https://www.packtpub.com/application-development/swift-functional-programming-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781787284500), published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the book from start to finish.
## About the Book
Swift is a multi-paradigm programming language enabling you to tackle different problems in various ways. Understanding each paradigm and knowing when and how to utilize and combine them can lead to a better code base. Functional programming (FP) is an important paradigm that empowers us with declarative development and makes applications more suitable for testing, as well as performant and elegant. This book aims to simplify the FP paradigms, making them easily understandable and usable, by showing you how to solve many of your day-to-day development problems using Swift FP.

It starts with the basics of FP, and you will go through all the core concepts of Swift and the building blocks of FP. You will also go through important aspects, such as function composition and currying, custom operator definition, monads, functors, applicative functors, memoization, lenses, algebraic data types, type erasure, functional data structures, functional reactive programming (FRP), and protocol-oriented programming (POP).

You will then learn to combine those techniques to develop a fully functional iOS application from scratch.

## Instructions and Navigation
All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

All chapters contains code files.

The code will look like the following:
```
let numbers = [9, 29, 19, 79]
// Imperative example
var tripledNumbers: [Int] = []
for number in numbers {
tripledNumbers.append(number * 3)
}
print(tripledNumbers)
```

To follow along with the examples in this book, you'll need to have an Apple computer with macOS 10.10 or higher installed. You'll also need to install Xcode 8.3 or newer with Swift 3.1 or newer.

## Related Products
* [Swift 3 Object-Oriented Programming - Second Edition](https://www.packtpub.com/application-development/swift-3-object-oriented-programming-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781787120396)

* [Swift 3 Protocol-Oriented Programming - Second Edition](https://www.packtpub.com/application-development/swift-3-protocol-oriented-programming-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781787129948)

* [Swift: Developing iOS Applications](https://www.packtpub.com/virtualization-and-cloud/swift-developing-ios-applications?utm_source=github&utm_medium=repository&utm_campaign=9781787120242)

* [Swift iOS Programming for Kids](https://www.packtpub.com/application-development/swift-ios-programming-kids?utm_source=github&utm_medium=repository&utm_campaign=9781787120747)

* [Swift 3 Game Development - Second Edition](https://www.packtpub.com/application-development/swift-3-game-development-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781787127753)

### Suggestions and Feedback
[Click here](https://docs.google.com/forms/d/e/1FAIpQLSe5qwunkGf6PUvzPirPDtuy1Du5Rlzew23UBp2S-P3wB-GcwQ/viewform) if you have any feedback or suggestions.
### Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781787284500