Created
July 19, 2016 03:52
-
-
Save ijoshsmith/f63dae6d309e12e68c02d523e1b7962e to your computer and use it in GitHub Desktop.
Morse code data model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Represents an entire Morse encoded message. | |
struct EncodedMessage { let encodedTerms: [EncodedTerm] } | |
/// Represents a word or number consisting of Morse code symbols. | |
struct EncodedTerm { let symbols: [Symbol] } | |
/// Represents a character encoded with Morse code marks. | |
struct Symbol { let marks: [Mark] } | |
/// Represents an individual component of a Morse code symbol. | |
enum Mark: String { case Dot = ".", Dash = "-" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment