[Solved] Creating Set in F# with elements from 1111 to 6666


You can use a sequence comprehension:

let values = seq {
    for i in 1110 .. 10 .. 6660 do
      for j in 1 .. 6 do
        yield i + j
    }

and create a set using Set.ofSeq e.g.

let s = Set.ofSeq values

1

solved Creating Set in F# with elements from 1111 to 6666