- Mastering Elixir
- André Albuquerque Daniel Caixinha
- 127字
- 2021-08-05 10:42:48
Working with collections
Contrary to the most common programming languages, Elixir doesn't have while or do ... while constructs, which makes sense, given all data types are immutable. The way to iterate in Elixir is by using recursion, through functions that call themselves. Most of your needs when working with collections are covered by the high-level abstractions Elixir provides, meaning that you may barely use recursion when writing your Elixir applications.
Nevertheless, we'll begin this section by briefly describing recursion, and show an example of a recursive function in Elixir. Then, we'll see how we can process a collection using the Enum module, and finish the section by talking about the benefits of processing a collection lazily, and how to do it using the Stream module.
- INSTANT Mock Testing with PowerMock
- Python快樂編程:人工智能深度學習基礎
- 劍指Offer(專項突破版):數(shù)據(jù)結構與算法名企面試題精講
- iOS開發(fā)實戰(zhàn):從零基礎到App Store上架
- Practical Windows Forensics
- Lua程序設計(第4版)
- Microsoft Dynamics GP 2013 Reporting, Second Edition
- JavaScript入門經(jīng)典
- 零基礎入門學習Python(第2版)
- 運用后端技術處理業(yè)務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- NGINX Cookbook
- Python語言實用教程
- 并行編程方法與優(yōu)化實踐
- Java Web應用開發(fā)給力起飛
- 零基礎學C語言(第4版)