Saturday, August 25, 2012

Association structures

A variety of data structures can be described as associations of values to places:
  • Records: have a finite collection of places. For example, colors have :red, :green, and :blue places.
  • Lists: have an infinite and enumerated set of places. The places in lists and vectors are enumerated by the nth function.
  • Hashes: may have anything, even other hashes, as places.
Lists and hashes can both be generalized to container types because unlike records they contain an infinite number of places.

No comments:

Post a Comment