Open in app
Durul Dalkanat
4.1K Followers
About

Sign in

4.1K Followers
About
Open in app
Intro to Higher Order Functions in Swift 3
277
7

Jayven N

Durul Dalkanat

Durul Dalkanat

Mar 24, 2017·1 min read

one more thing Flat Map

let nestedArray = [[1,2,3], [4,5,6]]let flattenedArray = nestedArray.flatMap { $0 }flattenedArray // [1, 2, 3, 4, 5, 6]

or

var multipliedFlattenedArray = nestedArray2.flatMap { $0.map 
{ $0 * 2 }
}

Written by

Durul Dalkanat

Health Research Program’s iOS Developer, currently lives in Washington, D.C http://www.about.me/durul

More from Durul Dalkanat

Health Research Program’s iOS Developer, currently lives in Washington, D.C http://www.about.me/durul

More From Medium

Bash Commands Guide

Durul Dalkanat

50 iOS Interview Questions And Answers

Durul Dalkanat

35 unforgettable images that capture Trump’s wild and bitter presidency

Business Insider in Business Insider

Armie Hammer Has Been Accused Of Being Into Cannibalism

Carrie Wynn in Fearless She Wrote

I’ll Never Be a Chief Technology Officer Again… Unless It’s for My Own Company

James Williams in The Innovation

From 15,000 Database Connections to Under 100

Sun-Li Beatteay in Better Programming

Another Jesus Was Found in Egypt

Jonathan Poletti in History of Yesterday

This Is What It Will Take For Bitcoin To Reach $100,000

Concoda in Concoda

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store