- Kotlin Standard Library Cookbook
- Samuel Urbanowicz
- 142字
- 2021-07-23 19:05:50
Discovering the concept of sequences
In terms of high-level functionalities, the Sequence and Collection data structures are nearly the same. They both allow iteration through their elements. There are also many powerful extension functions in the Kotlin standard library that provide declarative-style data-processing operations for each of them. However, the Sequence data structure behaves differently under the hood—it delays any operations on its elements until they are finally consumed. It instantiates the subsequent elements on the go while traversing through them. These characteristics of Sequence, called lazy evaluation, make this data structure quite similar to the Java concept, Stream. To understand all of this better, we are going to implement a simple data-processing scenario to analyze the efficiency and behavior of Sequence and contrast our findings with Collection-based implementation.
- 數(shù)據(jù)科學實戰(zhàn)手冊(R+Python)
- Mobile Application Development:JavaScript Frameworks
- Python數(shù)據(jù)分析入門與實戰(zhàn)
- Hands-On Machine Learning with scikit:learn and Scientific Python Toolkits
- 零基礎玩轉(zhuǎn)區(qū)塊鏈
- Xcode 7 Essentials(Second Edition)
- Programming ArcGIS 10.1 with Python Cookbook
- Blender 3D Incredible Machines
- Building Android UIs with Custom Views
- Unity 2018 Shaders and Effects Cookbook
- Cocos2d-x by Example:Beginner's Guide(Second Edition)
- WildFly Cookbook
- Android 游戲開發(fā)大全(第二版)
- Using Yocto Project with BeagleBone Black
- 趣學數(shù)據(jù)結(jié)構(gòu)