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

See also

  • This recipe gave us an insight into how Kotlin standard library implementations of ranges for primitives are easy to work with. A problem can appear if we want to traverse non-primitive types using the for loop. However, it turns out we can easily declare a range for any Comparable type. This will be shown in the Building custom progressions to traverse dates recipe.
  • As you have noticed, we are using the in operator to specify the object that is being iterated in the loop. However, there are also other scenarios where the in and !in operators can be used together with ranges. We will investigate them in depth in the Using range expressions with flow control statements recipe.

主站蜘蛛池模板: 丹凤县| 都安| 孟村| 新乐市| 秦皇岛市| 金塔县| 乳山市| 和林格尔县| 美姑县| 南川市| 芜湖县| 榆社县| 和田县| 蒙阴县| 隆化县| 新昌县| 满城县| 页游| 新河县| 山阳县| 会泽县| 卓资县| 黔江区| 鄱阳县| 乐东| 普定县| 汪清县| 建水县| 鱼台县| 齐河县| 昌乐县| 儋州市| 香港 | 家居| 呼图壁县| 墨脱县| 郧西县| 福鼎市| 莫力| 双辽市| 信宜市|