- 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.
推薦閱讀
- Visual Basic .NET程序設計(第3版)
- CMDB分步構建指南
- Beginning Java Data Structures and Algorithms
- OpenCV實例精解
- 編程卓越之道(卷3):軟件工程化
- Vue.js入門與商城開發(fā)實戰(zhàn)
- Java性能權威指南(第2版)
- iOS開發(fā)實戰(zhàn):從入門到上架App Store(第2版) (移動開發(fā)叢書)
- Python 3 數(shù)據(jù)分析與機器學習實戰(zhàn)
- Android Studio開發(fā)實戰(zhàn):從零基礎到App上線 (移動開發(fā)叢書)
- Angular Design Patterns
- Python一行流:像專家一樣寫代碼
- Microsoft HoloLens By Example
- Using Yocto Project with BeagleBone Black
- Flutter從0基礎到App上線