The documentation about type extensions contains the following example code:
type seq<’T> with
/// Repeat each element of the sequence n times
member xs.RepeatElements(n: int) =
seq { for x in xs do for i in 1 .. n do yield x }
This example code won't compile, it will throw:
error FS0964: Type abbreviations cannot have augmentations
and
error FS0895: Type abbreviations cannot have members
The proper code would be (assuming System.Collections.Generic is opened)
type IEnumerable<'T> with
/// Repeat each element of the sequence n times
member xs.RepeatElements(n: int) =
seq { for x in xs do for i in 1 .. n do yield x }
Note that the text itself mentions that type abbreviations cannot be extended.