let factors n = [for x in 1 .. n do if n % x = 0 then yield x]
As Kvb showed you can use a guard without a sequence.
let posInt n = [if n > 0 then yield n]
On a side note:
Since list are not lazy in F# you have to use a sequence for an infinite series.
let posInfinite = seq {1 .. Int32.MaxValue}
You can't make an infinite sequence of increasing integers with list comprehension alone. You have to use recursion or another built in function like unfold. .Net does have an arbitrary length integer type called BigInteger. You can use it by just adding an "I
" as the type on an integer. This example will return a true infinite sequence of integers.
let posInfinite = Seq.unfold (fun i -> Some(i, i + 1I)) 1I