Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open System.Threading
- let randomNumber x =
- Thread.Sleep(1)
- (new System.Random()).Next(1, x)
- let randomIndividual x =
- [for _ in 1..x -> randomNumber x]
- let randomPopulation count size =
- [for _ in 1..count -> randomIndividual size]
- let printPopulation population =
- population |>
- List.iter (fun x -> printf "%A\n" x)
- printPopulation (randomPopulation 10 8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement