Compiled Chronicles

An archive of software development blog by Angelo Villegas

Tag: Iterator

  • Swift: Range Operators

    Swift includes two range operators, closed range and half-closed range, which are shortcuts for expressing a range of values. Range operators are most commonly used with the for loop. In Objective-C, we have 2 different for loops, the traditional loop and iteration-based loop. Traditional For Loop The traditional for loop found in C requires 3 parts: the initialisation, the condition, and the loop expression. The initialisation declares (and perhaps…