I am working on a small project and am trying to learn F# the functional way ,for some strange reason I am unable to generate a random number and as such unable to get a random date. here is my F# code
let IfancyHerList = [("Sara",1); ("Saima",2); ("Zoe",3);("Scarlett",4);
("Jennifer",5);("Sandra Bullock",6)]
let MyGirlFriend = List.pick (fun funToNight ->
let n = rand.Next(10)
match funToNight with
| (value,n ) -> Some value
|_ -> None) IfancyHerList
printfn "Your date for tonight is %s lucky fella" MyGirlFriend
The let n = rand.Next(10) does generate a random number but not in match block
any suggestion would be most welcome
thanks