Skip to content

Commit

Permalink
Merge pull request #602 from cstiago/564-add-notes-square-brackets-sy…
Browse files Browse the repository at this point in the history
…ntax

#564 Add notes on square brackets syntax
  • Loading branch information
developedby committed Jun 24, 2024
2 parents d6ea001 + 8127865 commit 4b13120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ type Map:
```

Notice that the getter and setter syntax induces an order on things using the map, since every get or set operation depends on the value of the previous map.
> **_NOTE:_** Do not get mistaken with lists creation syntax, that also uses `[` `]`.
### Mixing syntaxes

Expand Down
1 change: 1 addition & 0 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ def main:
```

Will return `1`, which is the first element.
> **_NOTE:_** Despite creating lists with `[` `]`, the syntax used for accessing values as in `type[key]` is actually related to the `Map` built-in type.
We also have a syntax sugar for strings in Bend, which is just a list of `u24`
characters (UTF-16 encoded). The `"Hello, world!"` type we've seen used it!
Expand Down

0 comments on commit 4b13120

Please sign in to comment.