refactor 3 lines of code that appear twice
refactor 3 lines of code that appear twice

name                       old time/op  new time/op  delta
_10values_windowsize1       495ns ± 4%   488ns ± 4%   ~     (p=0.667 n=2+2)
_100values_windowsize10    9.38µs ± 2%  9.13µs ± 0%   ~     (p=0.333 n=2+2)
_10Kvalues_windowsize100   1.73ms ± 0%  1.72ms ± 0%   ~     (p=0.333 n=2+2)
_10Kvalues_windowsize1000  2.42ms ± 0%  2.42ms ± 0%   ~     (p=0.667 n=2+2)

JaderDias/movingmedian