Theoretical Paper
- Computer Organization
- Data Structure
- Digital Electronics
- Object Oriented Programming
- Discrete Mathematics
- Graph Theory
- Operating Systems
- Software Engineering
- Computer Graphics
- Database Management System
- Operation Research
- Computer Networking
- Image Processing
- Internet Technologies
- Micro Processor
- E-Commerce & ERP
- Dart Programming
- Flutter Tutorial
- Numerical Methods Tutorials
- Flutter Tutorials
- Kotlin Tutorial
Practical Paper
Industrial Training
Kotlin Working Ranges
Ranges implement ClosedRange
An arithmetic progression is represented by integral type progressions such as CharProgression, IntProgression, Long Progression. Progressions represent the first element, the last element and the step which is non-zero. The first element is first, sub-sequent elements represent previous element plus step and the last element is the last element unless progression is completed.
Progression refers to subtype of Iterable< N>, where N is Char, Int or Long. As progression is Iterable< N> type it can be used in for-loop and function such as filter, map etc.
The . .operator creates an object for integral type which implements both ClosedRange
The last element of the Progression is largest value not greater than the end value for positive step. The minimum value of progression is not less than the end value for negative step. The last value is checked by using (last-first) %step == 0.