GitBook: [master] 5 pages modified

This commit is contained in:
Dmitry Kurinskiy 2021-06-22 13:29:13 +00:00 committed by gitbook-bot
parent c132a77544
commit 743fe257ba
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
4 changed files with 25 additions and 2 deletions

View File

@ -9,7 +9,8 @@
* [Language](language/README.md) * [Language](language/README.md)
* [Variables](language/variables.md) * [Variables](language/variables.md)
* [Types](language/types.md) * [Types](language/types.md)
* [Execution flow](language/operators.md) * [Execution flow](language/operators/README.md)
* [Sequential](language/operators/sequential.md)
* [Expressions](language/expressions/README.md) * [Expressions](language/expressions/README.md)
* [Header](language/expressions/header.md) * [Header](language/expressions/header.md)
* [Functions](language/expressions/functions.md) * [Functions](language/expressions/functions.md)

View File

@ -0,0 +1,4 @@
# Sequential
Sequential

View File

@ -39,8 +39,26 @@ Immutable collection with 0 or 1 value: `?`
Appendable collection with 0..N values: `*` Appendable collection with 0..N values: `*`
Any data type can be prepended with a quantifier: `*u32`, `[][]string`, `?ProductType` these types are absolutely correct.
You can access a distinct value of a collection with `!` operator, optionally followed by an index. You can access a distinct value of a collection with `!` operator, optionally followed by an index.
Examples:
```text
strict_array: []u32
array_of_arrays: [][]u32
element_5 = strict_array!5
element_0 = strict_array!0
element_0_anotherway = strict_array!
-- It could be an argument or any other collection
maybe_value: ?string
-- This ! operator will FAIL if maybe_value is backed by a read-only data structure
-- And will WAIT if maybe_value is backed with a stream (*string)
value = maybe_value!
```
### Arrow Types ### Arrow Types
Every function has an arrow type that maps a list of input types to an optional output type. Every function has an arrow type that maps a list of input types to an optional output type.
@ -54,7 +72,7 @@ The absence of arguments is denoted by nothing: `-> ()` this arrow takes nothing
Note that there's no `Unit` type in Aqua: you cannot assign the non-existing result to a value. Note that there's no `Unit` type in Aqua: you cannot assign the non-existing result to a value.
```python ```python
-- Assume that arrow: -> () -- Assume that arrow has type: -> ()
-- This is possible: -- This is possible:
arrow() arrow()