mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-19 07:37:56 +03:00
Add use syntax documentation
This commit is contained in:
parent
8cc2e54683
commit
2dabbfb44d
15
README.md
15
README.md
@ -89,6 +89,21 @@ A let term binds some value to the next term, in this case `(* result 2)`:
|
||||
let result = (+ 1 2); (* result 2)
|
||||
```
|
||||
|
||||
The use term inline clones of some value to the next term:
|
||||
```rs
|
||||
use result = (+ 1 2); (* result result)
|
||||
|
||||
// Equivalent to
|
||||
(* (+ 1 2) (+ 1 2))
|
||||
```
|
||||
The same term with `let` duplicates the value:
|
||||
```rs
|
||||
let result = (+ 1 2); (* result result)
|
||||
|
||||
// Equivalent to
|
||||
let {result_1 result_2} = (+ 1 2); (* result_1 result_2)
|
||||
```
|
||||
|
||||
It is possible to define tuples:
|
||||
```rs
|
||||
tup = (2, 2)
|
||||
|
Loading…
Reference in New Issue
Block a user