Skip to content

Instantly share code, notes, and snippets.

@Mreyna3
Created May 26, 2019 21:22
Show Gist options
  • Save Mreyna3/7064ce8254de61c4dd2a841b3cdd8a13 to your computer and use it in GitHub Desktop.
Save Mreyna3/7064ce8254de61c4dd2a841b3cdd8a13 to your computer and use it in GitHub Desktop.
processBatch
func processBatch(){
// 1
for _ in 0..<queue.getCount(){
// 2
batchSum -= queue.peek()!
print("deueuing \(queue.dequeue()!)")
}
print("deueuing \(batchSum!)")
// 3
resetBatchSum()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment