- 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.
推薦閱讀
- C++程序設計教程
- 編程的修煉
- JavaScript:Functional Programming for JavaScript Developers
- Android Application Development Cookbook(Second Edition)
- Learning Linux Binary Analysis
- Animate CC二維動畫設計與制作(微課版)
- Kotlin Standard Library Cookbook
- Java性能權威指南(第2版)
- 軟件工程
- Kali Linux Wireless Penetration Testing Beginner's Guide(Third Edition)
- Instant Lucene.NET
- Mastering React
- 硬件產品設計與開發:從原型到交付
- Java7程序設計入門經典
- Instant Apache Camel Messaging System