https://github.com/corasaurus-hex/janet-sequence-cursor
A data structure for moving around sequences (lists/arrays/tuples) in janet.
https://github.com/corasaurus-hex/janet-sequence-cursor
Last synced: 4 months ago
JSON representation
A data structure for moving around sequences (lists/arrays/tuples) in janet.
- Host: GitHub
- URL: https://github.com/corasaurus-hex/janet-sequence-cursor
- Owner: corasaurus-hex
- Created: 2020-08-14T22:44:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-17T03:44:09.000Z (about 4 years ago)
- Last Synced: 2025-01-18T22:28:22.743Z (over 1 year ago)
- Language: Janet
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sequence Cursor
A library for moving around a sequence (list/array/tuple) in Janet.
## Usage
1. Add this a dependency in your `project.janet` file and install deps.
```clojure
(declare-project
:name "my-project"
:description "my project"
:dependencies ["https://github.com/corasaurus-hex/janet-sequence-cursor"])
```
```sh
jpm deps
```
2. Import the module.
```clojure
(import sequence-cursor :as sc)
```
3. Use!
```clojure
(def seq (sc/make [:a :b :c]))
(:next seq)
;;# => :a
```
## Documentation
Check out the tests and the docs on individual functions for more on how to use this.