小编Rah*_*oré的帖子

表达式中"或"的Haskell语法

在F#中,我可以用来|在模式匹配时对案例进行分组.例如,

let rec factorial n = 
  match n with
  | 0 | 1 -> 1                 // like in this line
  | _ -> n * factorial (n - 1)
Run Code Online (Sandbox Code Playgroud)

什么是Haskell语法?

f# haskell functional-programming

30
推荐指数
5
解决办法
7092
查看次数

标签 统计

f# ×1

functional-programming ×1

haskell ×1