Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning Swift

You're reading from   Beginning Swift Master the fundamentals of programming in Swift 4

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781789534313
Length 202 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Rob Kerr Rob Kerr
Author Profile Icon Rob Kerr
Rob Kerr
Kåre Morstøl Kåre Morstøl
Author Profile Icon Kåre Morstøl
Kåre Morstøl
Arrow right icon
View More author details
Toc

Chapter 6. Functional Programming and Lazy Operations

In this lesson, we will take a brief look at functional programming and learn what lazy operations are. We will end with an important but often overlooked topic: writing Swifty code.

Functional programming is a style of programming which tries to keep things simple by avoiding state, especially mutable state, and using a relatively small set of highly versatile functions/methods which take other functions as input. The Swift Standard Library contains several of these. They often make the code shorter, simpler, and easier to read if you know what they do. They can also free you from the burden of having to come up with names for temporary variables. Even if you don't use them in your own code, it is important to know how they work as a lot of Swift code out there uses them.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime