Created
November 28, 2017 03:07
-
-
Save mahmudahsan/d40adfd182d6994c338aba7d937f49eb to your computer and use it in GitHub Desktop.
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
let pairOfNumbers = [(2, 3), (5, 10), (4, 5)] | |
class MultiplcationOp : Operation{ | |
var inputPair: [(Int, Int)]? | |
override func main() { | |
guard let inputPair = inputPair else { return } | |
for pair in inputPair{ | |
let result = pair.0 * pair.1 | |
print(result) | |
} | |
} | |
} | |
let classOp = MultiplcationOp() | |
classOp.inputPair = pairOfNumbers | |
classOp.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment