Functions - Abstraction and applicationTutorial (draft)Functional valuesPolymorphismDocumentation and user's manualTable of contentsOCaml programs

Polymorphism

   
  In Objective Caml

a type or a function can be written generically

so that it can deal equally well with any values without depending on their type.

For instance:

  • Lists, pairs and binary trees can be written generically.
  • List reversal, computing the first component of a pair or the number of nodes of a binary tree can be written generically.


Latest update : October 5, 2006
This document was translated from LaTeX by Hyperlatex 2.5, which is not the latest version of Hyperlatex.

Functions - Abstraction and applicationTutorial (draft)Functional valuesPolymorphismDocumentation and user's manualTable of contentsOCaml programs