- Kotlin Standard Library Cookbook
- Samuel Urbanowicz
- 102字
- 2021-07-23 19:05:47
Traversing through ranges using progression with a custom step value
Besides doing so for the Iterator instances, progressions implementations for integral types, such as the Int, Long, and Char types, also include the step property. The step value specifies the intervals between the subsequent elements of a range. By default, the step value of a progression is equal to 1. In this recipe, we are going to learn how to traverse a range of alphabet characters with a step value equal to 2. In the result, we want to have every second alphabet letter printed to the console.
推薦閱讀
- Advanced Quantitative Finance with C++
- C# 7 and .NET Core Cookbook
- Windows系統(tǒng)管理與服務(wù)配置
- jQuery EasyUI網(wǎng)站開發(fā)實戰(zhàn)
- 我的第一本算法書
- INSTANT Mercurial SCM Essentials How-to
- TypeScript實戰(zhàn)指南
- Spring核心技術(shù)和案例實戰(zhàn)
- 用案例學(xué)Java Web整合開發(fā)
- Mastering Web Application Development with AngularJS
- Python 3 數(shù)據(jù)分析與機器學(xué)習(xí)實戰(zhàn)
- Professional JavaScript
- 量子計算機編程:從入門到實踐
- 你必須知道的.NET(第2版)
- HTML5/CSS3/JavaScript技術(shù)大全