Mask function. Based on Andre Bartetzki's CMask.


(mask low high genfn)(mask low high genfn exp)
Maps values from a generator function to a range given by 
low and high. Low and high may be numbers or bpf's. Optional 
:exp key/val argument affects the exponent for the mapping. 
Mapping follows y = x ^(2^exponent).