Skip to content

Instantly share code, notes, and snippets.

@Mreyna3
Created June 6, 2019 05:06
Show Gist options
  • Save Mreyna3/5161dc37990a86a9f845299b59a0a9c8 to your computer and use it in GitHub Desktop.
Save Mreyna3/5161dc37990a86a9f845299b59a0a9c8 to your computer and use it in GitHub Desktop.
updated processBatch function
func processBatch(){
for _ in 0..<queue.getCount(){
batchSum -= queue.peek()!
//1
print("deueuing \(queue.dequeue()!.format())")
}
//2
print("deueuing \(batchSum!.format())")
resetBatchSum()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment