Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Update 2015-10-17-advanced-practical-enum-examples.org #3

Merged
merged 1 commit into from Oct 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -153,7 +153,7 @@ This allows you to use the much nicer looking *Delete* or *Write* cases, and lat

** Nesting Enums

If you have specific sub type requirements, you can also logically nest enums in an enum. This allows you to contain specific information on your enum case within the actual enum. Imagine a character in an RPG. Each character can have a weapon, all characters have access to the sae set of weapons. All other instances in the game do not have access to those weapons (they're trolls, they just have clubs).
If you have specific sub type requirements, you can also logically nest enums in an enum. This allows you to contain specific information on your enum case within the actual enum. Imagine a character in an RPG. Each character can have a weapon, all characters have access to the same set of weapons. All other instances in the game do not have access to those weapons (they're trolls, they just have clubs).

#+BEGIN_SRC swift
enum Character {
Expand Down