Book Description:
Bring the power of Swift functional programming to iOS, OS X and Web development to build clean, smart and reliable applicationsAbout This BookWritten for Swift 2, this is a comprehensive guide that introduces iOS and OS X developers to the all-new world of functional programming that has so far been alien to themLearn about first-class functions and how imperative-style patterns can be converted into functional code using some simple techniquesThe book will get you familiar with using functional programming alongside existing OOP techniques so you can get the best of both worlds and develop clean, robust codeWho This Book Is ForThe book is for iOS and OS X developers with basic knowledge of Swift programming. Prior knowledge of object-oriented programming is assumed.What You Will LearnGet familiar with functions in Swift and understand how to define and use them aligned with functional paradigmsDefine and use pure functional data structuresExplore the map, filter, and reduce methods in the Swift programming languageCombine functional programming with OOP in your day-to-day development activitiesDevelop an iOS application with functional and object-oriented programming paradigmsUnderstand the design patterns in functional programming with SwiftDefine and use enumerations and algebraic data typesCombine functional paradigms with OOP to develop an iOS applicationIn DetailFunctional programming is getting a lot of attention because it eases many of the difficulties faced in object-oriented programming (OOP) such as testability, maintainability, scalability, and concurrency. Swift has a lot of functional programming features that can be easily used, but most Objective-C and Swift programmers are not familiar with these tools.This book aims to simplify the functional programming paradigms and make it easily usable for Swift programmers, showing you how to use popular functional programming techniques to solve many of your day-to-day development problems. Whether you are new to functional programming and Swift or experienced, this book will provide you with the skills you need to design and develop high-quality, easily maintainable, scalable, and efficient applications for iOS, Mac OS X, tvOS, and WatchOS. Through this book, you’ll learn to build bug-free, maintainable code using functional programming.We start with functional programming concepts, the basics of Swift, and essential concepts such as functions, closures, optionals, enumerations, and generics in detail with coding examples. Later, we introduce more advanced topics such as functional data structures, mondas, functors, and functional design patterns. Finally, we’ll provide a working code example of a real-world application developed with these techniques.