How do I customize output of a custom type using printf?

It looks like the Right Way to do this in F# 2.0 is by using the StructuredFormatDisplay attribute, for example: [<StructuredFormatDisplay(“hello {a}”)>] type myType = {a: int} In this example, instead of the default {a = 42;}, you would get hello 42. This works the same way for object, record, and union types. And although … Read more

F#: String.Join and |> operator

String.Join is a .NET method. When using a .NET method, F# views it as a function that takes a tuple as an argument (when calling it you write parameters as f(a, b)). The |> operator can be used with functions that use the curried form of parameters (and can be called by writing f a … Read more