5 Shaping data
This chapter covers
- The F# type system
- Tuples
- Records
- Anonymous Records
Up until now, we’ve only dealt with primitive types, such as integers or strings, or built-in .NET types, such as System.Uri
. Of course, F# needs a way to compose primitives together to make our own types: customers, orders, etc. F#’s type system has several ways to do this, and we’ll cover most of them in this chapter.
5.1 Composing types in F#
F# has a few more options and capabilities than many (although not all) languages. F# runs on the .NET platform, which means that it has to be able to understand all of the core .NET types and capabilities. This book ignores most of those features—things like classes and enums—not because you can’t use them (indeed, ...
Get F# in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.