Skip to content

Instantly share code, notes, and snippets.

func f <T: FloatingPoint> (_ p: T, _ x: T = 0.5) -> Bool{
return p < x
}
public protocol Selfie: CustomStringConvertible {}
extension Selfie {
var description: String {
let mirror = Mirror(reflecting: self)
return "\(mirror.subjectType)( \(mirror.children.map({ "\($0!): \($1) "}).joinWithSeparator(", ")))"
}
}