Difference between revisions of "Recursive data type"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Created page with "In computer programming languages, a '''recursive data type''' (also known as a '''recursively-defined''', '''inductively-defined''', or '''inductive...")
 
 
Line 1: Line 1:
In computer [[Programming language|programming languages]], a '''recursive data type''' (also known as a '''recursively-defined''', '''inductively-defined''', or '''inductive data type''') is a [[data type]] for values that may contain other values of the same type.  
+
In computer [[Programming language|programming languages]], a '''recursive data type''' (also known as a '''recursively-defined''', '''inductively-defined''', or '''inductive data type''') is a [[data type]] for values that may contain other values of the same type.  See [[Recursion (computer science)]].  
  
 
== Description ==
 
== Description ==
Line 5: Line 5:
 
Data of recursive types are usually viewed as [[Directed graph|directed graphs]].
 
Data of recursive types are usually viewed as [[Directed graph|directed graphs]].
  
An important application of recursion in computer science is in defining dynamic data structures such as Lists and Trees.
+
An important application of recursion in computer science is in defining dynamic data structures such as [[List (computer science)|lists]] and [[Tree (computing)|trees]].
  
 
Recursive data structures can dynamically grow to a theoretically infinite size in response to runtime requirements; in contrast, a static array's size requirements must be set at compile time.
 
Recursive data structures can dynamically grow to a theoretically infinite size in response to runtime requirements; in contrast, a static array's size requirements must be set at compile time.
  
Sometimes the term "inductive data type" is used for algebraic data types which are not necessarily recursive.
+
Sometimes the term "inductive data type" is used for [[Algebraic data type|algebraic data types]] which are not necessarily recursive.
  
 
== See also ==
 
== See also ==
Line 15: Line 15:
 
* [[Algebraic data type]]
 
* [[Algebraic data type]]
 
* [[Directed graph]]
 
* [[Directed graph]]
 +
* [[List (computer science)]]
 
* [[Node (computer science)]]
 
* [[Node (computer science)]]
 +
* [[Recursion (computer science)]]
 
* [[Recursive definition]]
 
* [[Recursive definition]]
 +
* [[Tree (computing)]]
  
 
== External links ==
 
== External links ==
Line 24: Line 27:
  
 
[[Category:Computer programming]]
 
[[Category:Computer programming]]
 +
[[Category:Recursion]]

Latest revision as of 13:49, 15 September 2016

In computer programming languages, a recursive data type (also known as a recursively-defined, inductively-defined, or inductive data type) is a data type for values that may contain other values of the same type. See Recursion (computer science).

Description

Data of recursive types are usually viewed as directed graphs.

An important application of recursion in computer science is in defining dynamic data structures such as lists and trees.

Recursive data structures can dynamically grow to a theoretically infinite size in response to runtime requirements; in contrast, a static array's size requirements must be set at compile time.

Sometimes the term "inductive data type" is used for algebraic data types which are not necessarily recursive.

See also

External links