... | @@ -107,8 +107,8 @@ Comparing to the **Memory** extension, stacks are ordered (LIFO) and can be quer |
... | @@ -107,8 +107,8 @@ Comparing to the **Memory** extension, stacks are ordered (LIFO) and can be quer |
|
This extension adds three additional constructs:
|
|
This extension adds three additional constructs:
|
|
|
|
|
|
* `push(+Type:type, +Arg:Type)` - pushes value of `Type` on the stack
|
|
* `push(+Type:type, +Arg:Type)` - pushes value of `Type` on the stack
|
|
* 'pop(+Type:type, -Arg:Type)` - pops value of `Type` from the stack, fails if there is no value of this type on the stack
|
|
* `pop(+Type:type, -Arg:Type)` - pops value of `Type` from the stack, fails if there is no value of this type on the stack
|
|
* `top(+Type:type, -Arg:Type)` - gets the last added element of `Type` from the stack, but doesn't remove it from the stack
|
|
* `top(+Type:type, -Arg:Type)` - gets the last added element of `Type` from the stack, but doesn't remove it from the stack
|
|
* new loop `while(pop(+Type:type, -Arg:Type), Query:query)` - that loops while the stack contains value of a type `Type`
|
|
* `while(pop(+Type:type, -Arg:Type), Query:query)` - new loop that loops while the stack contains value of a type `Type`. It can be used to simulate recursion, there is no guarantee it finishes.
|
|
|
|
|
|
|
|
|