Change the representation of optimized list of operation and add folding.
Merge pull request #4 from Drup/master

Change the representation of optimized list of operation and add folding.