added comments and simple tests for curry.