Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FlexibleTypes.fs « mdoc.Test.FSharp « mdoc.Test « mdoc - github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e06b9bf9761f9144925360f8cfadcbf699e9ba0 (plain)
1
2
3
4
5
6
7
8
9
10
module FlexibleTypes

let iterate1 (f : unit -> seq<int>) =
    for e in f() do printfn "%d" e
let iterate2 (f : unit -> #seq<int>) =
    for e in f() do printfn "%d" e
let iterate3<'T when 'T :> seq<int>> (f : unit -> 'T) = ()
let iterate4<'T when 'T :> Customers.ICustomer> (f : unit -> 'T) = ()