Red-black trees with types

  • Authors:
  • Stefan Kahrs

  • Affiliations:
  • University of Kent at Canterbury, Canterbury, Kent, UK

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Chris Okasaki showed how to implement red-black trees in a functional programming language. Ralf Hinze incorporated even the invariants of such data structures into their types, using higher-order nested datatypes. We show how one can achieve something very similar without the usual performance penalty of such types, by combining the features of nested datatypes, phantom types and existential type variables.