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

Customers.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: 6f238cf7a3c851d6def283a2e4ac7929d62251a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Customers


// Another way of implementing interfaces is to use object expressions.
type ICustomer =
    abstract Name : string
    abstract Age : int

let createCustomer name age =
    { new ICustomer with
        member __.Name = name
        member __.Age = age }