官术网_书友最值得收藏!

How it works...

In the result, we are going to get the following code printed to the console:

zxvtrpnljhfdb

In the beginning, we declared a range containing all the alphabet characters in decreasing order with the downTo() function. Then, we transformed the range a the custom progression containing every second character with the step() function. Finally, we are using the Iterable.forEach() function to iterate through the next elements of the progression and print each of them to the console.

The step() extension function is available for the IntProgression, LongProgression, and CharProgression types. Under the hood, it creates a new instance of a progression copying the properties of the original one and setting up the new step value.

主站蜘蛛池模板: 阳朔县| 丰城市| 邹城市| 宁陵县| 定兴县| 扎赉特旗| 南郑县| 广平县| 乐安县| 平江县| 哈密市| 临夏市| 杭锦旗| 锦州市| 佳木斯市| 柳河县| 丰县| 宜都市| 易门县| 双流县| 香港 | 安西县| 盘山县| 九台市| 伊宁县| 徐闻县| 丰城市| 高碑店市| 金川县| 左权县| 子长县| 鹿邑县| 北川| 禹州市| 长汀县| 如皋市| 商丘市| 五峰| 沂源县| 万山特区| 丰顺县|