Advertisement

Understanding Types in Functional Programming

  • Don Syme
  • Adam Granicz
  • Antonio Cisternino

Abstract

F# is a typed language, and F# programmers often use types in sophisticated ways. In this chapter, you will learn about the foundations of types, focusing on how they are defined and used in F# functional programming. You also will look closely at generics, and closely related to generics is the notion of subtyping. Generics and subtyping combine to allow you to write code that is generic over families of types. You will see how F# uses automatic generalization to automatically infer generic types for your code, and the chapter will cover some of the basic generic functions in the F# libraries, such as generic comparison, hashing, and binary serialization.

Keywords

Generic Comparison Functional Programming Type Inference Record Type Type Definition 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Don Syme, Adam Granicz and Antonio Cisternino 2015

Authors and Affiliations

  • Don Syme
    • 1
  • Adam Granicz
    • 1
  • Antonio Cisternino
    • 1
  1. 1.GrantchesterUK

Personalised recommendations