| 日時: | 2016-09-21 |
|---|---|
| 作: | @voluntas |
| バージョン: | 1.0.1 |
| url: | https://voluntas.github.io/ |
2016 年 6 月 24 日に行われる BPStudy の発表資料です
| // 多変数の型パラ持ちのprotocolでtype-erasureを書く時に、共変性をサポートしたいが | |
| // 素直なtype-erasureでは引数にバラバラにpropertyを渡すことでしか共変な型消しをinitできなかった。 | |
| class Animal {} | |
| class Cat: Animal {} | |
| protocol A { | |
| associatedtype X | |
| var x: X { get } |
| import Foundation | |
| typealias SectionConfig = [String: String] | |
| typealias Config = [String: SectionConfig] | |
| func trim(_ s: String) -> String { | |
| let whitespaces = CharacterSet(charactersIn: " \n\r\t") | |
| return s.trimmingCharacters(in: whitespaces) |
| 日時: | 2016-09-21 |
|---|---|
| 作: | @voluntas |
| バージョン: | 1.0.1 |
| url: | https://voluntas.github.io/ |
2016 年 6 月 24 日に行われる BPStudy の発表資料です
| #|-*- mode:lisp -*-|# | |
| #| | |
| exec ros -Q -- $0 "$@" | |
| |# | |
| #| | |
| Generate a Hubot script (.js file) from the given Roswell script. | |
| Usage: | |
| $ hubotify <roswell script> |
| import UIKit | |
| import QuartzCore | |
| class ViewController: UIViewController { | |
| @IBOutlet weak var label: UILabel | |
| @IBOutlet weak var counter: UILabel | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |