Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cocoaheads #13

Cocoaheads #13

Those little things that make you’re work more productive every day
- templates;
- extensions;
- playgrounds;

vmalakhovskiy

December 16, 2017
Tweet

More Decks by vmalakhovskiy

Other Decks in Programming

Transcript

  1. ==

  2. extension User: Equatable { static func == ( lhs: User,

    rhs: User ) -> Bool { return lhs.name == rhs.name && lhs.surname == rhs.surname }
  3. static func restrictedRandom( title: String = .random(), link: String =

    .random() ) -> Video { return Video( title: title, link: link ) }
  4. class FakeProtocol: Protocol { let doSmthCall = FunctionCall<Int, String>() func

    doSmth(arg: Int) -> String { return stubCall( doSmthCall, argument: arg, defaultValue: .random() ) } }