arraylib

Crates.ioarraylib
lib.rsarraylib
version0.3.0
sourcesrc
created_at2020-03-14 08:42:28.770265
updated_at2020-04-05 19:51:50.175586
descriptionTools for working with arrays
homepagehttps://github.com/WaffleLapkin/arraylib/
repositoryhttps://github.com/WaffleLapkin/arraylib/
max_upload_size
id218501
size117,483
Waffle Maybe (WaffleLapkin)

documentation

https://docs.rs/arraylib/

README

arraylib

CI status Telegram crates.io documentation (docs.rs) documentation (master) LICENSE

arraylib provides tools for working with arrays. See docs for more.

[dependencies]
arraylib = "0.3"

Compiler support: requires rustc 1.41+

Examples

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| {})
Commit count: 57

cargo fmt