F# 为什么F在我的最后一行“disp”函数中发现错误?
您需要使用rec指示递归函数:F# 为什么F在我的最后一行“disp”函数中发现错误?,f#,F#,您需要使用rec指示递归函数: 您需要使用rec指示递归函数: let disp xs (d:float) = match xs with | [] -> ' ' // return the space char | (a,b)::ts -> if(a > d) then b // Found else (disp ts d) let rec disp xs (d:floa
您需要使用rec指示递归函数:
let disp xs (d:float) =
match xs with
| [] -> ' ' // return the space char
| (a,b)::ts -> if(a > d)
then b // Found
else (disp ts d)
let rec disp xs (d:float) =
match xs with
| [] -> ' ' // return the space char
| (a,b)::ts -> if(a > d)
then b // Found
else (disp ts d)