This file contains 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
protocol RawableKey { | |
associatedtype RawType | |
var rawValue: RawType { get } | |
} | |
extension Dictionary { | |
subscript<K: RawableKey>(enumKey: K) -> Value? { | |
get { | |
if let key = enumKey.rawValue as? Key { |
This file contains 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
class A { } | |
class B: A { } | |
class C: A { } | |
func play(_ a: A) { | |
print("playing with A") | |
} | |
func play(_ b: B) { | |
print("playing with B") |
This file contains 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
["BAAL", "BACK", "BAIL", "BAIN", "BAIS", "BAIT", "BALD", "BALE", "BALK", "BALL", "BALT", "BAND", "BANE", "BANK", "BANT", "BARD", "BARE", "BARK", "BARN", "BART", "BASE", "BASK", "BASS", "BAST", "BATE", "BATS", "BATT", "BEAD", "BEAK", "BEAL", "BEAN", "BEAT", "BECK", "BEEK", "BEEN", "BEES", "BEET", "BEID", "BELD", "BELL", "BELT", "BELY", "BEND", "BENE", "BENN", "BENT", "BERE", "BERN", "BERT", "BESS", "BEST", "BIAS", "BICE", "BICK", "BIEN", "BILE", "BILK", "BILL", "BIND", "BINE", "BINK", "BINT", "BIOD", "BION", "BIOS", "BIRD", "BIRK", "BIRL", "BIRN", "BITE", "BITT", "BLAD", "BLAE", "BLAN", "BLAS", "BLAT", "BLAY", "BLEE", "BLET", "BLIP", "BLOT", "BOAT", "BOCE", "BOCK", "BOID", "BOIL", "BOIS", "BOLD", "BOLE", "BOLK", "BOLL", "BOLT", "BOND", "BONE", "BONK", "BONY", "BOOD", "BOOK", "BOOL", "BOON", "BOOT", "BORD", "BORE", "BORN", "BORT", "BOSE", "BOSK", "BOSN", "BOSS", "BOTE", "BOTT", "BRAD", "BRAE", "BRAN", "BRAT", "BRAY", "BRED", "BREE", "BRET", "BREY", "BRIN", "BRIT", "BROD", "BROT", "BUAL", "BUCK", "BULK", "BULL", |
This file contains 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
// | |
// MJPEGImageView.swift | |
// TestMJPEG | |
// | |
// Created by Nico Ameghino on 4/23/16. | |
// Copyright © 2016 Nicolas Ameghino. All rights reserved. | |
// | |
import UIKit |