Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 F# 中定义了这两个函数
let f t = match t with |_ when t = 0 -> 1 |_ -> g t-1 let g t = 1 + (f t)
但是,F# 编译器不接受它。它说
stdin(9,16): error FS0039: The value or constructor 'f' is not defined
请帮我!谢谢。
let rec ... and ...F# 支持使用语法互斥。这是你的例子
let rec ... and ...
let rec f t = match t with |_ when t = 0 -> 1 |_ -> g t-1 and g t = 1 + (f t)