@@ 12,7 12,7 @@ https://kyleperik.com/pipes/
Pipes statements define what it should select, and what to generate with it.
```
-? 'marco' : 'polo';
+'marco' : 'polo';
```
This basic snippet selects on any 'marco' input, and spits out 'polo'
@@ 26,7 26,7 @@ basic string input and output. To select a device, simply specify
the type in your match/result statements.
```
-? ['input', 'marco'] : ['log', 'polo'];
+['input', 'marco', state] : ['log', 'polo'];
```
Now this is a working program. Type 'marco' in the input textbox
@@ 39,7 39,7 @@ for a key to give assign it to a reference, which can be used in
the result.
```
-? ['input', value] : ['log', value];
+['input', value, state] : ['log', value];
```
### Piping
@@ 49,9 49,9 @@ abstracting out the extraction to and from devices by including
multiple stages.
```
-? ['input', value] : value
-? 'marco' : 'polo'
-? value : ['log', value];
+['input', value, state] : value
+'marco' : 'polo'
+value : ['log', value];
```
Each stage selects for criteria, and has it's own
@@ 60,12 60,12 @@ result which is passed to the following stage to process.
You can include multiple rules within each step using grouping.
```
-? { type: 'input', value } : value | (
+['input', value, state] : value | (
- ? 'marco' : 'polo';
- ? 'dog' : 'woof';
+ 'marco' : 'polo';
+ 'dog' : 'woof';
-) ? value : { type: 'log', value };
+) value : ['log', value];
```
### Definitions
@@ 75,11 75,11 @@ into a reusable pattern, making use very succinct.
```
def input {
- ? ['input', value] : value;
+ ['input', value, state] : value;
}
def log {
- ? value : ['log', value];
+ value : ['log', value];
}
-| input ? 'marco' : 'polo' | log;
+| input | 'marco' : 'polo' | log;
```