Announcing sqnc: sequence traits and adaptors

I have been writing a crate for low-level operations on polynomials. Most functions in that crate work with a sequence of coefficients. Using an ndarray::ArrayBase for the coefficients seems logical, but I didn't want to rule out alternatives, in particular a simple slice. So I created sqnc: sequence traits with adaptors similar to Iterator. The crate is free of allocation, doesn't require std and provides implementations for slice, array, std::ops::Range and ndarray::ArrayBase. To whet your appetite, here's a boring example using Sequence::get():

use sqnc::Sequence;

let x = 4..8; // `std::ops::Range<usize>`, implements `Sequence`
assert_eq!(x.get(1), Some(5));

And an example showing off the adaptors Sequence::select() and Sequence::copied():

use sqnc::Sequence;

let x = *b"cdelst!"; // array of `u8`, implements `Sequence`
let y =[4, 2, 3, 2, 0, 5, 2, 1, 6].copied()).unwrap();

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.