Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The term "closure" is used an a variety of ways, mostly tracking back to a Mathematical concept of completion, in some sense.</p> <ul> <li><p>An operator is "closed over" a set of values if applying that operator to values from the set always produces a value from the given set. For example, addition is closed over the integers, but division isn't (4 / 2 is integral, but 5 / 2 isn't). So addition of integers is somehow "complete" in a sense that division isn't.</p></li> <li><p>The "transitive" closure of a relation "completes" the relation by following (all possible) multiple applications. In everyday terms, the concept of "is a descendent of" is the transitive closure of the relation "is a child of".</p></li> <li><p>A functional "closure" is "completed" by e.g. specifying how the free variables are to be resolved. In the pseudo-code expression:</p> <pre><code>bump = function(x) (x + y) </code></pre> <p><code>x</code> is the argument to <code>bump</code>, but the definition seems to leave "open" the question of resolving <code>y</code>. On the other hand, if we define:</p> <pre><code>bumper = function(y) (function(x) (x + y)) </code></pre> <p>then invoking <code>bumper</code> returns a function which adds the original argument of <code>bumper</code> to the created function's argument, so that:</p> <pre><code>add3 = bumper(3) </code></pre> <p>is equivalent to defining:</p> <pre><code>add3 = function(x) (x + 3) </code></pre> <p>The nested definition is "closed over" (or completed by) the variables available at the point of its definition.</p></li> </ul> <p>So, in effect, the uses of "closure" above all have different specific meanings, and at first glance seem unrelated, but there's a subtle underlying relationship.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload