Skip to content

Instantly share code, notes, and snippets.

View juzooda's full-sized avatar

Rafael Juzo Gomes Oda juzooda

View GitHub Profile
export default class Stripe {
}
//: Playground - noun: a place where people can play
import UIKit
func createSetWith(enable: Bool, requestList: [[String : Any]]) -> Set<String> {
return Set(requestList
.filter { ($0["enabled"] as? Bool) == enable }
.map { $0["key"] as? String ?? ""})
}
import UIKit
protocol StackType {
func example()
}
struct SimpleStack<T: StackType> {
private var list:[T] = []
@juzooda
juzooda / structToDic.playground
Created March 9, 2017 14:40
Simple Protocol to convert swift structs to dictionaries
import UIKit
struct Person: DictionaryConvertor {
let name: String
let job: [Job]?
let errors: [String]?
}
struct Job: DictionaryConvertor {
let title: String