Well u know i wouldnt have done the first way, but it is simple, and resonably easy to follow, same thing each line, add a bigger delay each time.

Some times simple repetition of code is better than proper code.
like sorting 5 numbers
Code:
alias sort5 {
  var %1 = $1, %2 = $2, %3 = $3, %4 = $4, %5 = $5, %x
  if (%1 > %2) { var %x = %1, %1 = %2, %2 = %x }
  if (%2 > %3) { var %x = %2, %2 = %3, %3 = %x }
  if (%3 > %4) { var %x = %3, %3 = %4, %4 = %x }
  if (%4 > %5) { var %x = %4, %4 = %5, %5 = %x }
  if (%1 > %2) { var %x = %1, %1 = %2, %2 = %x }
  if (%2 > %3) { var %x = %2, %2 = %3, %3 = %x }
  if (%3 > %4) { var %x = %3, %3 = %4, %4 = %x }
  if (%1 > %2) { var %x = %1, %1 = %2, %2 = %x }
  if (%2 > %3) { var %x = %2, %2 = %3, %3 = %x }
  if (%1 > %2) { var %x = %1, %1 = %2, %2 = %x }
  return %1 %2 %3 %4 %5
}

^ just an example but its quick and dirty to write, and doesnt need to be debugged, since its just drop through.