Skip to content

Instantly share code, notes, and snippets.

@ha1f
Created November 15, 2019 03:31
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 ha1f/6d7c9dd494656e7bf07bce8981e65936 to your computer and use it in GitHub Desktop.
Save ha1f/6d7c9dd494656e7bf07bce8981e65936 to your computer and use it in GitHub Desktop.
func const<T, U>(_ value: T) -> (U) -> T {
return { _ in value }
}
func identity<T>() -> (T) -> T {
return { $0 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment