Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

Dictionary

pNre edited this page Jun 18, 2014 · 18 revisions

Contents

Instance Methods

Iteration

each

  • each (eachFunction each: (KeyType, ValueType) -> ())

Calls eachFunction for each (key, value) couple in self.

Examples

Without indexes
let dictionary = ["A": 1, "B": 2, "C": 3]
dictionary.each { key, value in println(key, value) }
/* Prints → */
// (A, 1)
// (B, 2)
// (C, 3)
Clone this wiki locally