I did a refactoring for vec! from the LIne Plot, I avoided the duplication from the original code. For |s| s I used the variable F, because it is a closure which takes the argument s and returnss the operations done on the argument.
In this case, it was necessary, because we were mapping the multiple seconds from 0 to the self.elapsed.inner_second() in the 2D space by using a tuple.
In addition tot this, context s is used as usize so that's why we F(usize) -> usize. Added for Series<Time, usize), because we need to specify the generics X and Y we are working on with for pts which a Vec<X,Y>.
I did a refactoring for vec! from the LIne Plot, I avoided the duplication from the original code. For |s| s I used the variable F, because it is a closure which takes the argument s and returnss the operations done on the argument. In this case, it was necessary, because we were mapping the multiple seconds from 0 to the self.elapsed.inner_second() in the 2D space by using a tuple. In addition tot this, context s is used as usize so that's why we F(usize) -> usize. Added for Series<Time, usize), because we need to specify the generics X and Y we are working on with for pts which a Vec<X,Y>.