There's nothing natural about Functional Programming. It's awkward, it feels funny, ...
And then one day you start to see the world differently and you can't remember what was so difficult.
A Functional Programming Kickstart is a hands-on, fast-moving kickstart will provide you with a new set of skills that you can add to - not replace - your current favorite programming techniques. In no time you’ll be creating and using higher-order functions, embracing value types, avoiding side-effects, and digging deep into map(), flatMap(), and apply().
You use functions and methods to get things done but have you ever thought that those things you do with Strings, Ints, and other types can also be done with functions. We begin this book by learning how to construct functions that are safe to use and to pass around.
Sure. You can store functions as properties, create functions that return other functions, and create and use functions that accept other functions. In no time this book will have you creating these so-called higher-order functions and exploring many provided for you in the Swift Standard Library.
Chapter 1 Magic
Chapter 2 Functions aren't special
Chapter 3 Higher-order Functions
Chapter 4 Arrays
Once you’ve explored map() and flatMap() for Arrays you are prepared to take things to a whole other level. We work to see map() and flatMap() as design patterns and not just as functionality we’re given for collections. We’ll see map() as pattern by extending examples provided for Array, Optionals, and the Result type. Once you have the big idea of map() down you’ll understand all the fuss about functors.
This prepares you to look at flatMap() and see how map() allows us to transform a result but flatMap() allows us to interact with our environment. In addition to built in types, and illustrative types we explore the Writer, Reader, and State monads. Understanding this broader context will help you apply the standard bits of the standard library with more confidence and prepare you to master the Combine frameworks.
Chapter 5 Map
Chapter 6 FlatMap
Chapter 7 Apply
Chapter 8 Deeper Magic
What you need
You need a Mac running the latest public release of Xcode.
The code in this book is Swift 5.3 and runs on Xcode 12 on Mac OS Big Sur. It has been tested on Apple Silicon.
You've purchased this product
See it in your libraryView in Library
We charged your card and sent you a receipt
You'll need an account to access this in our app. Please create a password to continue.
Download from the App Store or text yourself a link to the app
Thank you - I will send a note when there are updates.
Good news! Since you already have a Gumroad account, it's also been added to your library.