Added test cases for left apply, right apply. Fixes #65.