lukkid 0.1.0

lukkid is a library for Arithmetic Sequences.
Documentation
  • Coverage
  • 66.67%
    4 out of 6 items documented1 out of 5 items with examples
  • Size
  • Source code size: 4.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • polymaxcube/Lukkid
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • samiti3d

A library for Arithmetic Sequences.

Example

  • creating your sequence using Sequence()::new(?,?,?);
  • sum all of list using zigma(<<put Sequence() Object here>> );
#[cfg(test)]
mod tests {
    use super::*;
    #[test]
    fn it_works() {
        let mut c = 0;
        for n in Sequence::new(2,10,2){
            println!("It is: {}", n);
            c += n;
        }
        assert_eq!(c, 20);
        let sl = zigma(Sequence::new(2,10,2), 0);
        assert_eq!(sl, 20);

        let fl = Sequence::new(2, 10, 2).fold(0,|acc,x|acc+x);
        assert_eq!(fl, 20);
    }
}