Skip to content

Instantly share code, notes, and snippets.

@keizo042
Created August 23, 2018 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keizo042/694c06a7d3b3042d329c0796284c0d44 to your computer and use it in GitHub Desktop.
Save keizo042/694c06a7d3b3042d329c0796284c0d44 to your computer and use it in GitHub Desktop.
class Status{}
class Yet : Status{}
class Done: Status{}
class Once<T :Status> {
var value: int
static func get() -> OneTime<Yet> {
return Once<Yet>()
}
}
extension OnceImpl where T: Yet {
func get() {
return self.value
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment