Skip to content

Instantly share code, notes, and snippets.

@austenstrine
Created February 28, 2019 03:41
Show Gist options
  • Save austenstrine/2907b8c520a485fbc1d99681e00222bb to your computer and use it in GitHub Desktop.
Save austenstrine/2907b8c520a485fbc1d99681e00222bb to your computer and use it in GitHub Desktop.
import Foundation
infix operator =!& : AssignmentPrecedence
func =!&<T:NSCopying>(lhs: inout T, rhs: T)
{
lhs = rhs.copy(with: nil) as! T
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment