Bring the power of Swift functional programming to iOS, Web, macOS, watchOS and tvOS application development and build clean, smart, scalable and reliable applications
1234567

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

Dr. Fatih Nayebi

Dr. Fatih Nayebi earned his Ph.D. degree in software engineering from École de technologie supérieure, Université du Québec by researching on Mobile Human-Computer Interaction, Software Engineering, and Machine Learning. Fatih has 15 years of industry experience in software engineering and architecture in various fields. He has developed various applications with Visual Basic, C++, C#, Java, MATLAB, Python, Objective-C, and Swift. He is also an enthusiastic Node, Scala, and Haskell developer.

His specialties include applied predictive and optimization models, human-computer interaction, functional programming, machine learning, and mobile application architecture and development.

Fatih currently works as a Director, Consulting at CGI Group Inc, Montreal, and continues to his academic research and publications as a postdoctoral researcher at École de technologie supérieure.

You can find him talking on Swift and Functional Programming at meetups such as http://www.meetup.com/swift-mtl/, on Git Hub at https://github.com/conqueror, and on Twitter as @thefatih.

  1. GETTING STARTED WITH FUNCTIONAL PROGRAMMING IN SWIFT
  2. FUNCTIONS AND CLOSURES
  3. TYPES AND TYPE CASTING
  4. ENUMERATIONS AND PATTERN MATCHING
  5. GENERICS AND ASSOCIATED TYPE PROTOCOLS
  6. MAP, FILTER, AND REDUCE
  7. DEALING WITH OPTIONALS
  8. FUNCTIONAL DATA STRUCTURES
  9. IMPORTANCE OF IMMUTABILITY
  10. THE BEST OF BOTH WORLDS – COMBINING FP PARADIGMS WITH OOP
  11. CASE STUDY – DEVELOPING AN IOS APPLICATION WITH THE FP AND OOP PARADIGMS