Recursive type



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)

Tagged:

Read Also:

  • Recurvate

    adjective 1. bent back or backward; recurved. adjective 1. (rare) bent back

  • Recurvation

    recurvation re·cur·va·tion (rē’kər-vā’shən) n. A backward bending or flexure. re·cur’vate’ (rĭ-kûr’vāt’, -vĭt) adj.



  • Recurve

    verb (used with or without object), recurved, recurving. 1. to curve or bend back or backward. verb 1. to curve or bend (something) back or down or (of something) to be so curved or bent

  • Recurved

    adjective 1. curved upward, as the bill of a bird. verb (used with or without object), recurved, recurving. 1. to curve or bend back or backward. verb 1. to curve or bend (something) back or down or (of something) to be so curved or bent



Disclaimer: Recursive type definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.