- Rust Programming Cookbook
- Claus Matzinger
- 76字
- 2021-06-24 12:27:48
Complex conditions with pattern matching
As shown in the previous recipe, pattern matching is very useful with enums. However, there is more! Pattern matching is a construct that originates in functional languages and curtails much of the choice between conditional branches and the assignment of properties in struct that commonly follows. These steps are taken at once, reducing the amount of code on the screen and creating something akin to a higher-order switch-case statement.
推薦閱讀
- SQL學習指南(第3版)
- ASP.NET動態網頁設計教程(第三版)
- 用Flutter極速構建原生應用
- JavaScript by Example
- Interactive Applications Using Matplotlib
- 用Python實現深度學習框架
- Hands-On Microservices with Kotlin
- Hands-On Enterprise Automation with Python.
- iOS應用逆向工程(第2版)
- 小程序開發原理與實戰
- .NET 3.5編程
- Python程序設計與算法基礎教程(第2版)(微課版)
- R Data Science Essentials
- Learn C Programming
- Python深度學習入門:從零構建CNN和RNN