Last active
September 30, 2015 13:44
-
-
Save mastoj/bf97dc3f4bb94fe8eb21 to your computer and use it in GitHub Desktop.
WhyNoFancyPrint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Car | |
type Make = Make of string | |
type Color = Color of string | |
type Year = Year of int | |
type Car = private {Make: Make; Year: Year; Color: Color} | |
with | |
member a.PrintYear() = printfn "%A" a.Year | |
let print (a:Car) = printfn "%A" a // Car+Car | |
let print (a:Car) = printfn "%+A" a // Print stuff nicely |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment