Merge pull request #5 from qianyan/master

add reduce
add compact.