Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Beginning Swift
  • Toc
  • feedback
Beginning Swift

Beginning Swift

By : Rob Kerr, Kåre Morstøl
4 (1)
close
Beginning Swift

Beginning Swift

4 (1)
By: Rob Kerr, Kåre Morstøl

Overview of this book

Take your first foray into programming for Apple devices with Swift.Swift is fundamentally different from Objective-C, as it is a protocol-oriented language. While you can still write normal object-oriented code in Swift, it requires a new way of thinking to take advantage of its powerful features and a solid understanding of the basics to become productive.
Table of Contents (10 chapters)
close

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.

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete