As you’ve probably noticed us gushing over here and there, objc.io is the highest-quality programming journal in the history of ever for us epicurean iOS-centric types; so when we noticed that the good folk over there have branched out into books,
Functional Programming in Swift
- Thinking Functionally: Get to know the functional programming paradigm
- Functional APIs: Designing functional, composable, and type-safe APIs
- Purity: Benefits of value types and immutability
- Purely Functional Data Structures: Use recursive enums to write simple data structures
- Parsing & Evaluating: A functional parsing library and a simple spreadsheet app as example
- Map, Filter, Reduce: Higher-order functions and functional manipulation of collections
- Optionals: How Swift solves the “missing value” problem, and why that’s a good idea
- Enums: Create your own data types with Swift’s enums for clarity and type safety
- Generators and Sequences: Understand the machinery underlying Swift’s collection types
- Applicative Functors and Monads: Common patterns underlying functional code
we figured the least we could do in thanks was go buy it … especially since the last time we did any real functional programming was a course so way back in the day that it used a pre-1.0 Haskell version. So y’know, a little help here to catch up on the last two and a half decades, probably in order, yes. Besides, we were immensely amused with Messr. Florian’s blog post about floundering around during the writing process.
And our evaluation is, they’ve done an absolutely wonderful job here. If you’re not fluent in functionalese, it gets the GO BUY IT RIGHT NOW rating; and if you are, there’s still enough Swift specificities and useful code right up to the complete spreadsheet implementation mentioned above that we’re completely confident you’ll find it more than worth the read!
UPDATES:
Non-Swift intros: An introduction to functional programming; Functors, Applicatives, And Monads In Pictures
7 Habits For a More Functional Swift
Swift Functional Programming Tutorial; Getting into functional programming with Swift
What is Functional Reactive Programming?; Younger self; Functional Reactive Intuition – Swift edition
Enough About Swift Closures to Choke a Horse; Instance Methods are Curried Functions in Swift; Swift Function Currying; Closure Expressions in Swift; First Class Functions and Delayed Evaluation in Swift; Functions are Just Named Closures; Handling Multiple Closure Parameters; Curry take-out with a side of Image Processing
Introduction to Function Currying in Swift; Function Currying in Swift
Adopting map() & reduce() in Swift; Function Composition in Swift; Swift: The Tao of Mappage; Maps… Wait, They Don’t Love You Like I Love You; Flattenin’ Your Mappenin’; What do map() and flatMap() really do?; map() can be taxing; Reduce all the things
Functor and Monad in Swift; Swift Adventures In Monad Land; Functor and Monad in Swift; Monads in Swift; Paragons Of Perfunctory Programs; Swift Functors, Applicatives, and Monads in Pictures; Three Useful Monads; What The Heck Is A Monad; Let’s talk about Monads; Understand Monads with this One Weird Trick; Functors, Applicatives, and Monads in Plain English
Immutable Types with Changing State in Swift; Conveniently Transforming Immutable Types in Swift; Mutating Functions in Swift Structs
A straw man argument for trying more functional-style programming in Swift
Efficient JSON in Swift with Functional Concepts and Generics; SwiftyJSON; Nice Web Services, Swift Edition
TypeLift: “Libraries to simplify development of Swift programs by utilising the type system.”
Basis: “Pure Declarative Programming in Swift, Among Other Things.”
Swiftz: “functional data structures, functions, idioms, and extensions that augment the Swift standard library.”
LlamaKit: “Collection of must-have functional Swift tools.”
Going Global: A Peek At Swift’s Global Functions
Creating ASCII art in functional Swift is very stylistically functional.
Zip, Map and Generics: The Evolution of a Swift Function; A Test Driven Custom Swift Zip Function Using Generics;
Generics in Swift, Part 1 and Part 2
Functional Programming: Understanding the Beauty of Custom Operators in Swift
Swift Optionals, Functional Programming, and You
RxSwift at first sight; RxSwift: an elegant weapon for a statically typed age; In-Depth Series Of RxSwift Tutorials By Example; ReactiveCocoa vs RxSwift
The Reactive Revolution of Swift; The Non-Reactive Solution; Comparing Reactive and Traditional
Swift closures cheatsheet; Swift Closures — Everyday Gems Part 1 of 2 and Part 2
Blending Cultures: The Best of Functional, Protocol-Oriented, and Object-Oriented Programming
