14 lines
278 B
Forth
14 lines
278 B
Forth
|
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 }
|
||
|
|