Skip to content

Commit

Permalink
docs: add docs for new contexts features
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloose committed Apr 29, 2024
1 parent 31889a3 commit 2f00f5f
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,23 @@ You have a variety of examples in the [examples](./examples/) directory (WIP).

usage: `get i`

- **set**: for setting an index to a value
- **set**: for setting a value at some index

usage: `set i value`, where `0 <= value <= max_value`
usage: `set i value`

where `0 <= value <= max_value`, otherwise panics

- **context**: makes future index ops relative to this context

usage: `context start end`

where `start`and `end` fall within the array's bounds

- **pop**: pops the last context

usage: `pop`

panics if there are no contexts to pop

`i` and `j` must be valid zero-based indexes.

Expand Down Expand Up @@ -139,6 +153,7 @@ cat examples/test | dist/sorthem
## Semantic Colors

- ![#ffffff](https://placehold.co/15x15/ffffff/ffffff.png) `#ffffff`: an iddle bar
- ![#e7ccff](https://placehold.co/15x15/e7ccff/e7ccff.png) `#ffffff`: iddle bar within a context
- ![#f33232](https://placehold.co/15x15/f33232/f33232.png) `#f33232`: two bars being swaped
- ![#9b54c3](https://placehold.co/15x15/9b54c3/9b54c3.png) `#9b54c3`: getting the value of the bar
- ![#2d43db](https://placehold.co/15x15/2d43db/2d43db.png) `#2d43db`: setting the value of the bar
Expand Down

0 comments on commit 2f00f5f

Please sign in to comment.