Last active
June 11, 2016 16:59
-
-
Save seivan/3819651417cd0bb6edb24ff2fd547c61 to your computer and use it in GitHub Desktop.
try this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ExpressionErased : Chainable { | |
var chainType: SQLiteChainType = .None | |
let __andOperator:((rhs:Chainable) -> [Chainable]) | |
init<T : Chainable>(expression:T) { | |
self.__andOperator = expression.andOperator | |
} | |
func andOperator(rhs: Chainable) -> [Chainable] { | |
return self.__andOperator(rhs: rhs) | |
} | |
} | |
//Usage | |
let oneWithIntErased = ExpressionErased(expression: oneWithInt) | |
let oneWithDoubleErased = ExpressionErased(expression: oneWithDouble) | |
let myBagOfGoodies = [oneWithIntErased, oneWithDoubleErased] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment