Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cartesianproducts [2015/04/21 17:38] 127.0.0.1 external edit |
cartesianproducts [2015/04/21 17:41] wikiadmin |
||
---|---|---|---|
Line 17: | Line 17: | ||
We would have the following properties on the corresponding sets: | We would have the following properties on the corresponding sets: | ||
- | \[ Node \subseteq Tree \] | + | \begin{equation*} Node \subseteq Tree \end{equation*} |
- | \[ Leaf \subseteq Tree \] | + | \begin{equation*} Leaf \subseteq Tree \end{equation*} |
- | \[ Node \cup Leaf = Tree \] | + | \begin{equation*} Node \cup Leaf = Tree \end{equation*} |
- | \[ Node \cap Leaf = \emptyset \] | + | \begin{equation*} Node \cap Leaf = \emptyset \end{equation*} |
=== Extractors === | === Extractors === | ||
Line 38: | Line 38: | ||
...would have their corresponding sets: | ...would have their corresponding sets: | ||
- | \[ ENode \subseteq Node \] | + | \begin{equation*} ENode \subseteq Node \end{equation*} |
- | \[ ELeaf \subseteq Leaf \] | + | \begin{equation*} ELeaf \subseteq Leaf \end{equation*} |
Now, a user could want to indicate that ENode not only matches Node's, but actually matches **all** of them (same for ELeaf of Leaf's). He would **need** to specify the following constraints: | Now, a user could want to indicate that ENode not only matches Node's, but actually matches **all** of them (same for ELeaf of Leaf's). He would **need** to specify the following constraints: | ||
- | \[ ENode \supseteq Node \] | + | \begin{equation*} ENode \supseteq Node \end{equation*} |
- | \[ ELeaf \supseteq Leaf \] | + | \begin{equation*} ELeaf \supseteq Leaf \end{equation*} |
(Note that we then have equality between the sets of the extractors and their corresponding types. This is the situation we have with case classes.) | (Note that we then have equality between the sets of the extractors and their corresponding types. This is the situation we have with case classes.) |