💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
| 操作符用来在模式中描述多个接受的模式: > The | operator can be used anywhere within patterns to describe multiple accepted patterns: ~~~ var match = switch(7) { case 4 | 1: "0"; case 6 | 7: "1"; case _: "2"; } trace(match); // 1 ~~~ 在一个 or 模式中,如果有一个捕获的变量,它必须也出现在它的子模式中。 > If there is a captured variable in an or-pattern, it must appear in both its sub-patterns.