Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #random
ADD COMMENT
Topic
Name
6+3 =