Chapter 8. Mastering F#: Common Techniques

F# is a powerful 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. This chapter presents some of the common F# coding techniques you need as you work across multiple programming domains. These techniques are either applications of the constructs you'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 : 'T -> 'T -> int when 'T : comparison
val (=) ...

Get Expert F# 2.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.