FinalSlot

From Erights

(Difference between revisions)
Jump to: navigation, search
(category)
(Created page. Is there anything more to add?)
Line 1: Line 1:
-
[[FinalSlot]] is the type of [[slot]] which underlies a [[final pattern]]. It is [[PassByCopy]]; it is given its value when it is created and cannot be assigned.
+
FinalSlot is an [[Slot]] that aquires its value at creation/definition time and there after always returns that value.
-
Maker FQN: <code>org.erights.e.elib.slot.makeFinalSlot</code>
+
The :final guard checks if the slot passed is an FinalSlot.
-
The FinalSlot guard is parameterizable with a guard for the value; e.g. <code>makeFinalSlot(1) :FinalSlot[float64] => &lt;&amp; 1.0></code>
+
An anology for people that design computer hardware is that defining an FinalSlot is akin to manifacture an ROM containing the
-
 
+
specified data.
-
== Maker protocol ==
+
-
 
+
-
=== asType/0 ===
+
-
{{asType|FinalSlot}}
+
-
 
+
-
=== run/1 ===
+
-
run(value :[[any]]) :FinalSlot
+
-
 
+
-
Makes a FinalSlot with the specified value.
+
-
 
+
-
[[Category:ELib specification]]
+

Revision as of 00:29, 24 March 2008

FinalSlot is an Slot that aquires its value at creation/definition time and there after always returns that value.

The :final guard checks if the slot passed is an FinalSlot.

An anology for people that design computer hardware is that defining an FinalSlot is akin to manifacture an ROM containing the specified data.

Personal tools
more tools