Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added set ops
  • Loading branch information
lichtkind committed Jun 23, 2015
1 parent 5658144 commit 6eadfa9
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
30 changes: 27 additions & 3 deletions docs/appendix-a-index.txt
Expand Up @@ -236,7 +236,7 @@ context, alias to [**code**()](#code-context)
[*junctive*](appendix-g-glossary#junction)
[*AND*](appendix-g-glossary#and),
requires that all conditions are met —
see also: [**all**](#all)
see also: [**all**](#all), [(&)](appendix-a-index#ampersand-set-op)

<a id="ampersand-metachar"/>
**&**
Expand Down Expand Up @@ -273,6 +273,30 @@ encompass a *subregex*, results (*submatches*) land in
[**\@()**](#round-brackets-var) or [**\$0**](#0-var)... (not limited to $9 anymore) &mdash;
see also: [**\[ \]** «metachar»](#square-brackets-metachar)

<a id="ampersand-set-op"/><a id="set-and"/>
**(&)**
[*«set op»*](appendix-b-grouped#sets) &mdash;
[*infix*](appendix-g-glossary#infix)
[*AND*](appendix-g-glossary#and) join operator for two sets
&mdash;
see also: [&](appendix-a-index#ampersand-op)

<a id="caret-set-op"/><a id="set-xor"/>
**(\^)**
[*«set op»*](appendix-b-grouped#sets) &mdash;
[*infix*](appendix-g-glossary#infix)
[*XOR*](appendix-g-glossary#xor) join operator for two sets
&mdash;
see also: [\^](appendix-a-index#caret-op)

<a id="pipe-set-op"/><a id="set-or"/>
**(|)**
[*«set op»*](appendix-b-grouped#sets) &mdash;
[*infix*](appendix-g-glossary#infix)
[*OR*](appendix-g-glossary#or) joining operator for two sets
&mdash;
see also: [|](appendix-a-index#pipe-op)

<a id="round-brackets-var"/>
**@( )**
[*«special var»*](appendix-b-grouped#match-variables) &mdash;
Expand Down Expand Up @@ -943,7 +967,7 @@ see also: [**|**](#pipe-escape)
[*XOR*](appendix-g-glossary#xor),
requires that exactly one of operands is [**True**](#True) in
[*bool context*](appendix-g-glossary#bool-context) to return **True** &mdash;
see also [**one**](#one)
see also [**one**](#one), [(\^)](appendix-a-index#caret-set-op)

<a id="caret-upto"/>
**\^** &mdash;
Expand Down Expand Up @@ -1011,7 +1035,7 @@ or a hashref when it is identified as a hash by the
[*«junctive op»*](appendix-b-grouped#junctions) &mdash;
[*junctive*](appendix-g-glossary#junction) [*OR*](appendix-g-glossary#or),
requires that a condition is fulfilled &mdash;
see also: [**any**](#any)
see also: [**any**](#any), [(|)](appendix-a-index#pipe-set-op)

<a id="pipe-metachar"/>
**|**
Expand Down
17 changes: 16 additions & 1 deletion docs/appendix-b-grouped.txt
Expand Up @@ -535,7 +535,7 @@ Junctions
---------

The [**infix**](appendix-a-index#infix-category)
[*ops*](appendix-g-glossary#operator) in the first columns create
[*ops*](appendix-g-glossary#operator) in the first column create
[*junctions*](appendix-g-glossary#junction) by combining two values
(can be [**Junctions**](appendix-a-index#Junction-type) itself),
the ops in second column are to be applied to a [*list*](appendix-g-glossary#list)
Expand All @@ -550,6 +550,21 @@ Junctive Infix Op Prefix Op Operation
---------------------------------- ----------------------------- ---------------------------------- -----------------------------------------------


Sets
----

The [**infix**](appendix-a-index#infix-category)
[*ops*](appendix-g-glossary#operator) in the first column create
a [*set*](appendix-g-glossary#set) with the following rules:

Set Op Meaning
---------------------------------------- --- -----------------------------------------------
[(&)](appendix-a-index#ampersand-set-op) AND elements, which are in both sets
[(\^)](appendix-a-index#caret-set-op) XOR elements, which are only in one of both sets
[(|)](appendix-a-index#pipe-set-op) OR elements, which are in one or both sets
---------------------------------------- --- -----------------------------------------------


Smartmatch
----------

Expand Down
8 changes: 8 additions & 0 deletions docs/appendix-g-glossary.txt
Expand Up @@ -911,6 +911,14 @@ is usable. It is normally the current surrounding [*block*](#block)
or (if there is none) the current file.


<a id="set"/>
**set** &mdash;
unordered, finite collection of values without duplicates.
Most commonly all elements have the same type.
Sets have in Perl 6 their own special container type called
[**Set**](appendix-a-index#Set-type).


<a id="sigil"/>
**sigil** &mdash;
Character that serves as a [*prefix*](#prefix) to categorize the following name
Expand Down

0 comments on commit 6eadfa9

Please sign in to comment.