Swift 3 Functional Programming

Swift 3 Functional Programming

English | 2016 | ISBN: 978-1-78588-388-0 | 296 Pages | PDF, EPUB | 10 MB

This book is based on Swift 3 Developer preview version and aims at simplifying the functional programming (FP) paradigms making it easily usable, by showing you how to solve many of your day-to-day development problems.
Whether you are new to functional programming and Swift or experienced, this book will strengthen the skills you need to design and develop high-quality, scalable, and efficient applications.
The book starts with functional programming concepts, the basics of Swift 3, and essential concepts such as functions, closures, optionals, enumerations, immutability, and generics in detail with coding examples.
Furthermore, this book introduces more advanced topics such as function composition, monads, functors, applicative functors, memoization, lenses, algebraic data types, functional data structures, functional reactive programming (FRP), protocol-oriented programming (POP) and mixing object-oriented programming (OOP) with functional programming (FP) paradigms.
Finally, this book provides a working code example of a front-end application developed with these techniques and its corresponding back-end application developed with Swift.
What You Will Learn

  • First-class, higher-order, and pure functions
  • Closures and capturing values
  • Custom operators, recursion, and memoization
  • Value and reference types in Swift
  • Enumerations, algebraic data types, patterns, and pattern matching
  • Generics and associated type protocols
  • Higher-order functions such as map, flatMap filter, and reduce
  • Dealing with optionals, fmap, and apply for multiple functional mapping
  • Functional data structures such as Semigroup, Monoid, Binary Search Tree, Linked List, Stack, and Lazy List
  • Immutability, copy constructors, and lenses
  • Combining FP paradigms with OOP, FRP, and POP in your day-to-day development activities
  • Developing a backend application with Swift
  • Developing an iOS application with FP, OOP, FRP, and POP paradigms
Homepage