Answers for "random in f#"

C#
0

random in f#

let alph = "abcdefg"

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

printfn "%O" <| randomCh()
printfn "%O" <| randomCh()
Posted by: Guest on May-06-2021

C# Answers by Framework

Browse Popular Code Answers by Language