clamp
ABSTRACT 
 Clamps an input to a range. The value of l should be less than or equal to the value of r
 PARAMETERS 
 | l | the number denoting the start of the range | 
| x | the number that we want to clamp | 
| r | the number denoting the end of the range | 
RETURN 
 r if x is greater than r, l if x is less than l, and otherwise x is returne
 DECLARATION 
 func clamp(l, x, r)