CHAPTER 8Mastering F#: Common Techniques

F# is a pow erful language with relatively simple constructs. Learning the constructs of the language is easy, but learning how to use the constructs well takes a little more time. In this chapter, we present some of the common F# coding techniques you will need as you work ac ross multiple programming domains. These techniques are either applications of the construc ts we've encountered so far or relate to the foundational libraries that ship with F# and .NET.

Equality, Hashing, and Comparison

In Chapter 5 you saw a number of predefined generic operations, including generic comparison, equality, and hashing, accessed via functions such as those shown here:

val compare : 'a -> 'a -> int val (=)   : 'a ...

Get Expert F# 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.