Created
November 30, 2015 08:58
-
-
Save hhtopcu/3237e1421eb57ddb135a to your computer and use it in GitHub Desktop.
This code includes basic comment style powered by Markdown
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
| /// Text like this appears in "Description". | |
| /// | |
| /// Leave a blank line to separate further text into paragraphs. | |
| /// | |
| /// You can use bulleted lists (use `-`, `+` or `*`): | |
| /// | |
| /// - Text can be _emphasised_ | |
| /// - Or **strong** | |
| /// | |
| /// Or numbered lists: | |
| /// | |
| /// 7. The numbers you use make no difference | |
| /// 0. The list will still be ordered, starting from 1 | |
| /// 5. But be sensible and just use 1, 2, 3 etc… | |
| /// | |
| /// --- | |
| /// | |
| /// More Stuff | |
| /// ========== | |
| /// | |
| /// Code | |
| /// ---- | |
| /// | |
| /// Use backticks for inline `code()`. Indentations of 4 spaces or more will create a code block, handy for example usage: | |
| /// | |
| /// // Create an integer, and do nothing with it | |
| /// let myInt = 42 | |
| /// doNothing(myInt) | |
| /// | |
| /// // Also notice that code blocks scroll horizontally instead of wrapping. | |
| /// | |
| /// Links & Images | |
| /// -------------- | |
| /// | |
| /// Include [links](https://en.wikipedia.org/wiki/Hyperlink), and even images: | |
| /// | |
| ///  | |
| /// | |
| /// - note: That "Note:" is written in bold. | |
| /// - requires: A basic understanding of Markdown. | |
| /// - seealso: `Error`, for a description of the errors that can be thrown. | |
| /// | |
| /// - parameters: | |
| /// - int: A pointless `Int` parameter. | |
| /// - bool: This `Bool` isn't used, but its default value is `false` anyway… | |
| /// - throws: A `BadLuck` error, if you're unlucky. | |
| /// - returns: Nothing useful. | |
| func doNothing(int: Int, bool: Bool = false) throws -> String { | |
| if unlucky { throw Error.BadLuck } | |
| return "Totally contrived." | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment