I define a function f as
f(x):=block([],if(x>=-1 and x<-1/4) then return(2),if(x>=-1/4 and x<0) then return(-1),if(x>=0 and x<1/4) then return(1),if(x>=1/4 and x<1) then return(-2));
It is clear that domain of this function is [-1;1)-interval.
How I can continue this function on the whole R periodically (by period 2)?