Section 1

Preview this deck

Optional

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (18)

Section 1

(18 cards)

Optional

Front

used when a value may be absent, replaces use of null $ exceptions; has a value or is nil

Back

Structs and Classes

Front

general-purpose, flexible constructs that become the building blocks of your program's code

Back

Dictionary

Front

unordered collections of key-value associations

Back

Array

Front

ordered collections of values

Back

Closures

Front

self-contained blocks of functionality that can be passed around and used in your code; function with no name

Back

Optionals

Front

handle the absence of a value

Back

Functions

Front

self-contained chunks of code that perform a specific task

Back

Dictionary Keys

Front

must be hashable (implement washable protocol); hashable types: int, float, double, strings, character, bool

Back

Var

Front

Variable; mutable data structure

Back

Extension

Front

adds new functionality to an existing class, structure, enumeration, or protocol type

Back

Tuple

Front

create and pass around groupings of values

Back

Let

Front

Constant; immutable data structure

Back

Protocol

Front

defines a blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality

Back

Set

Front

unordered collection of unique values

Back

Value Types

Front

copied when assigned to a variable or constant, passed to a function, or returned from a function; safe with no side effects; small structures always copied, large structure copied when modified

Back

Immutability

Front

unchangeable

Back

Bang(!)

Front

access value of optional; runtime error

Back

Enumeration

Front

dictionary w/o associated values

Back