Skip to content

Instantly share code, notes, and snippets.

View alkozin's full-sized avatar

Alexander Kozin alkozin

  • El Machine
  • Novosibirsk, Russian Federation
  • 12:24 (UTC +07:00)
View GitHub Profile
{ (location: CLLocation) in
}
//One dependency
Any
//Set of inputs
Set<Any>
//Keys customization
Dictionary<String, Any>
|{ (location: CLLocation) in
}
["CLLocationDistance": 250,
"CLLocationAccuracy": kCLLocationAccuracyHundredMeters] | { (l: CLLocation) in
}
//Working examples
//Async
//Anything from Nothing
|{ (anything: Anything) in
🧙🏼
}
//Determinate user's location
|{ (location: CLLocation) in
//Recognize 4 hands on input
let pipe = |{ (hands: [VNHumanHandPoseObservation]) in
}
let request: VNDetectHumanHandPoseRequest = pipe.get()
request.maximumHandCount = 4
let preview: AVCaptureVideoPreviewLayer? = pipe.get()
view.layer.addSublayer(preview!)
//Anything from Something
let anything: Anything = something|
let i: Int = float|
let string: String = data|
let front: UIColor = 0x554292|
let back: UIColor? = "#554292"|
//Put any
func put<T>(_ object: T) -> T
//Get any
func get<T>() -> T?
Expect.every { T in
}
Expect.while { T in
true
}
let expect = Expect.one { T in
|.every { T in
}
|.one { T in
}
|.while { T in
true