Skip to content

Instantly share code, notes, and snippets.

@mahmudahsan
Created November 28, 2017 03:07
Show Gist options
  • Save mahmudahsan/d40adfd182d6994c338aba7d937f49eb to your computer and use it in GitHub Desktop.
Save mahmudahsan/d40adfd182d6994c338aba7d937f49eb to your computer and use it in GitHub Desktop.
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