concept loop in category algorithms

appears as: loop, loops, loop, loops
Algorithms and Data Structures in Action

This is an excerpt from Manning's book Algorithms and Data Structures in Action.

#6 … then swaps parent and children

#7 Otherwise, we are sure that heap’s properties are reinstated, and we can exit the loop and return

 
Figure 14.3 A directed weighted graph, with loops. (Edge labels are omitted for the sake of clarity)
n ← length(A)
total ← A[0]
for i in {1..n-1} do
  total ← total + A[i] + A[i-1]2