let isPrime number = 
  if [2..number-1] |> List.exists (fun e -> number % e = 0) then false else true

printf "Primes from 1 to 50 are: "
  
[ for e in 2..50 do
    if isPrime e then yield e ]
  |> List.iter (printf "%d ")

printfn ""