add several new functions, especially reduce()
add a demo cpp file and also fix some bugs
add an interface for range
use namespace to encapsulate the functions to provide more flexibility
update the documents accordingly