Functions and Closures in Swift

Learn how to use functions and closures in Swift, Apple's new programming language for building iOS and Mac OSX apps.
4.5 (17 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
219 students enrolled
$19
$20
5% off
Take This Course
  • Lectures 34
  • Length 2 hours
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 6/2014 English

Course Description

This course focuses on the functional features of the Swift programming language. Concepts like closures, value capturing, higher order functions and closure inline expressions, among many more are covered through simple examples.

This course is relatively short but focused to give you a better understanding of functions and closures in Swift since they are as important as objects and classes.

What are the requirements?

  • Fundamental knowledge of programming basics
  • Basic knowledge of the Swift language
  • Apple Developer Account for compiling codes before Apple releases XCode officially

What am I going to get from this course?

  • Become familiar with functional features in Swift
  • Write more declarative and eloquent code
  • Become very comfortable with functions and closures in Swift
  • Create your own module or framework with some utility functions

What is the target audience?

  • Beginners who know the basics of Swift
  • Beginners who want to be very good at functions and closures
  • Intermediate developers who may need a refresher on functional concepts
  • Intermediate developers who may want to make a custom framework for their utility functions

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Welcome
01:25

Disclaimer

The Swift language is still under development and the features explored in these videos might or might not change in the next releases of this language. It is your responsibility to check out the documentation for relevant information and feature changes.

Section 2: Functions Basics
Intro to Functoins
07:01
4 questions

Test your understanding of the basics of functions in Swift

Section 3: Function Input Parameters
External Parameter Names
03:00
Variable Parameters
03:19
Variadic Parameters
03:27
Default Parameters
04:13
In-out Parameters
01:50
Functions as Arguments
Preview
04:59
12 questions

Test your understanding of function input parameters

Section 4: Function Return Values
Returning Multiple Values
02:09
Functions as Return Values
03:57
Curried Functions
05:02
Optional as Return Types
Preview
02:56
Section 5: Closures
Closure Basics
Preview
07:52
Passing Closures to Functions
03:32
Returning Closures from Functions
03:03
Arrays and Closures
01:36
Section 6: Arrays and Closures
Map
01:54
Map Exercise
01:46
Filter
03:06
Filter Exercise
02:14
Sort
02:18
Sort Exercise
01:45
Reduce
02:43
Reduce Exercise
03:06
Map, Filter, Reduce Together
Preview
04:27
Section 7: Extensions and Generics
Extensions
03:12
Generics
03:58
Section 8: Creating a Basic Utility Module (Framework)
Hello Modules (Cocoa Framework)
Preview
02:46
first
03:15
indexOf
02:16
contains
02:42
forEach
01:30
Packaging and Importing the Module
03:05
Section 9: Bonus Materials
Get My 2 Other Courses At A Steep Discount
Article

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Amin Meyghani, JavaScript Developer

My name is Amin and I currently work as a Senior Front-end Engineer at a software company called Yodle. I have worked on a variety of projects ranging from implementing user interfaces, to making productivity tools for engineers and designers. I am also very passionate about education and enjoy sharing what I learn with the world.

I am also the co-author of the Less Web Development Cookbook published by Packt Publishing. The book is about working with LESS on the client to make apps more maintainable.

I have been a self-taught learner as long as I can remember and I really enjoy sharing my findings and learnings with the world through any medium that I can. If you have any questions regarding any of my courses, you can reach me at amin@meyghani.net

Ready to start learning?
Take This Course