StackOverflow 文档 F# 教程 日志 将成员函数添加到记录中 将成员函数添加到记录中 Created: November-22, 2018 type person = {Name: string; Age: int} with // Defines person record member this.print() = printfn "%s, %i" this.Name this.Age let user = {Name = "John Doe"; Age = 27} // creates a new person user.print() // John Doe, 27 基本用法日志