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

Introduction

This chapter will focus on explaining the advantages of range expressions and sequences. These powerful data structure concepts offered by the Kotlin standard library can help you to improve the quality and readability of your code, as well as its safety and performance. Range expressions provide a declarative way of iterating through sets of comparable types using for loops. They are also useful for implementing concise and safe control flow statements and conditions. The Sequence class, as a missing supplement to the Collection type, provides a built-in lazy evaluation of its elements. In many cases, using sequences can help optimize data-processing operations and make the code more efficient in terms of computation complexity and memory consumption. The recipes covered in this chapter are going to focus on solving real-life programming problems. Moreover, at the same time, they are also going to explain how those concepts work under the hood.

主站蜘蛛池模板: 故城县| 澄城县| 开平市| 嵊泗县| 浮梁县| 平顺县| 东港市| 天柱县| 潜江市| 焉耆| 海丰县| 蓬莱市| 大邑县| 海晏县| 宝鸡市| 桓仁| 蒙城县| 朝阳区| 三穗县| 绥阳县| 凤翔县| 洛宁县| 锡林浩特市| 安多县| 囊谦县| 体育| 电白县| 邵东县| 云阳县| 二连浩特市| 宝应县| 台东市| 博白县| 分宜县| 长海县| 泸州市| 施秉县| 衢州市| 宽甸| 偏关县| 福海县|