各种编程语言的模式匹配
各种编程语言的模式匹配
Csharp https://learn.microsoft.com/zh-cn/dotnet/csharp/language-reference/operators/patterns
Scala https://docs.scala-lang.org/zh-cn/tour/pattern-matching.html
F# https://learn.microsoft.com/zh-cn/dotnet/fsharp/language-reference/pattern-matching
Haskell https://doc.yonyoucloud.com/doc/real-world-haskell-cn/chp/3.html#id10https://github.com/huangzworks/real-world-haskell-cn/
erlang https://www.w3cschool.cn/erlang/qik11p5y.htmlhttps://erldoc.com
elixir https://elixir-development.github.io/ElixirDocs/lessons/basics/control-structures.html
Rust https://kaisery.github.io/trpl-zh-cn/ch06-02-match.html
Swift https://docs.swift.org/swift-book/documentation/the-swift-programming-language/patterns
Zig https://ziglang.org/documentation/0.11.0/#switch
Java https://dev.java/learn/pattern-matching/
Kotlin(并没有模式匹配) https://book.kotlincn.net/text/control-flow.htmlhttps://github.com/Kotlin/KEEP/issues/371
https://github.com/Kotlin/KEEP/blob/guards/proposals/guards.md
OCaml
https://ocaml.org/docs/tour-of-ocaml#pattern-matching-contd
https://ocaml.org/docs/values-and-functions#pattern-matching-in-definitions
Moonbit https://www.moonbitlang.cn/docs/syntax#模式匹配
python https://docs.python.org/3/tutorial/controlflow.html#match-statements