Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattpolzin/idris-fvect
A Fin-based Vect (can be thought of as having both a current length and maximum capacity)
https://github.com/mattpolzin/idris-fvect
Last synced: about 1 month ago
JSON representation
A Fin-based Vect (can be thought of as having both a current length and maximum capacity)
- Host: GitHub
- URL: https://github.com/mattpolzin/idris-fvect
- Owner: mattpolzin
- License: mit
- Created: 2020-11-28T21:31:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T21:03:08.000Z (7 months ago)
- Last Synced: 2024-04-05T22:22:18.791Z (7 months ago)
- Language: Idris
- Size: 26.4 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
The starts of an Idris 2 FVect (Fin-based Vect) type and its utility functions.
The idea is to have a Vect type that knows not only how long it currently is but also the longest it ever could be. One reasonable interpretation of the latter is "capacity."
For example, it can be useful to create an FVect with a certain length and equal maximum capacity and know without additional work that filtering the values of the vector produces an equal-or-smaller number of values. FVect encodes the proof that the filtered FVect has size that is `LTE` the original size (i.e. capacity).