Sequence เป็น Lazy Iterable — การดำเนินการระดับกลาง เช่น map และ filter จะไม่ทำงานจนกว่าการดำเนินการเทอร์มินัล (toList, first, sum, forEach) จะดึงค่าต่างๆ เพื่อหลีกเลี่ยงการสร้างรายการระดับกลางขนาดใหญ่ สร้างด้วย sequenceOf, asSequence() บนคอลเลกชัน หรือ GenerateSequence สำหรับสตรีมที่ไม่มีที่สิ้นสุด

รายการเทียบกับลำดับ
Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.