downTo(_ lowBound: Int, callback: (Int) -> Void)

Invoke the callback with indexes from current int down to and including n.

Parameters

  • lowBound: The low bound to go to.
  • callback: The block to invoke with current index.
3.downTo(1) { print($0) }
// Print 3,2,1