📜  f# 中的随机数 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:54.578000             🧑  作者: Mango

代码示例1
let alph = "abcdefg"

let randomCh = 
    let random = Random()
    fun () -> alph.Chars (random.Next (alph.Length - 1))

printfn "%O" <| randomCh()
printfn "%O" <| randomCh()