Skip to content

Instantly share code, notes, and snippets.

View alkozin's full-sized avatar

Alexander Kozin alkozin

  • El Machine
  • Novosibirsk, Russian Federation
  • 01:25 (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
}
//Put any
func put<T>(_ object: T) -> T
//Get any
func get<T>() -> T?
|.every { T in
}
|.one { T in
}
|.while { T in
true
| .every { T in
} | .one { U in
} | .while { E in
true
}
| .every { T in
} | .one { U in
} | .any { some in
} | .all { last 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!)
Expect.every { T in
}
Expect.while { T in
true
}
let expect = Expect.one { T in