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
// Written by Thomas Durand (c)2019 ; all right reserved | |
// See https://www.thomasdurand.fr/swift/cryptokit/2019/06/25/generating-lottery-numbers-with-cryptokit.html for more context | |
/// Represent one `k among n` operation | |
struct Draw { | |
/// The number of number to draw (ie k) | |
let draw: UInt | |
/// The range of numbers to draw within (ie n) | |
let among: ClosedRange<Int> |
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
//: Playground - noun: a place where people can play | |
import XCPlayground | |
import UIKit | |
protocol ReusableView { | |
/// The index of the current view to compare when this view is visible | |
var index: Int { get } | |
/// A static method that will be used to instanciate a new ReusableView when needed |