recursive type

Computing Dictionary

recursive type definition


A data type which contains itself. The commonest example is the list type, in Haskell:
data List a = Nil | Cons a (List a)
which says a list of a's is either an empty list or a cons cell containing an 'a' (the "head" of the list) and another list (the "tail").
Recursion is not allowed in Miranda or Haskell synonym types, so the following Haskell types are illegal:
type Bad = (Int, Bad) type Evil = Bool -> Evil
whereas the seeminly equivalent algebraic data types are acceptable:
data Good = Pair Int Good data Fine = Fun (Bool->Fine)
The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source
Explore Dictionary.com
Previous Definition: recursive subroutine
Next Definition: recursive-definition
Words Near: recursive type
More from Thesaurus.com
Synonyms and Antonyms for recursive type
More from Reference.com
Search for articles containing recursive type
More from Dictionary.com Translator
Dictionary.com Word FAQs

Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.

Copyright © 2014 Dictionary.com, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature