https://github.com/wafflelapkin/arraylib
Tools for working with arrays in rust
https://github.com/wafflelapkin/arraylib
array rust-lang
Last synced: 3 months ago
JSON representation
Tools for working with arrays in rust
- Host: GitHub
- URL: https://github.com/wafflelapkin/arraylib
- Owner: WaffleLapkin
- License: mit
- Created: 2020-02-08T12:33:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-13T19:02:02.000Z (over 2 years ago)
- Last Synced: 2025-04-06T05:47:54.389Z (3 months ago)
- Topics: array, rust-lang
- Language: Rust
- Homepage: https://docs.rs/arraylib
- Size: 105 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# arraylib
[](https://github.com/WaffleLapkin/arraylib/actions)
[](https://vee.gg/t/WaffleLapkin)
[](https://crates.io/crates/arraylib)
[](https://docs.rs/arraylib)
[](https://arraylib.netlify.com/arraylib)
[](LICENSE)`arraylib` provides tools for working with arrays. See [docs](https://docs.rs/arraylib) for more.
```toml
[dependencies]
arraylib = "0.3"
```_Compiler support: requires rustc 1.41+_
## Examples
```rust
use arraylib::{Array, ArrayMap, ArrayExt};
// Array creation
let arr = <[_; 11]>::unfold(1, |it| {
let res = *it;
*it *= -2;
res
});// Mapping
let arr = arr.map(|it| it * 2);
assert_eq!(arr, [2, -4, 8, -16, 32, -64, 128, -256, 512, -1024, 2048]);// By-value iterator
arr.iter_move().for_each(|i: i32| {})
```