loop(int i=0;i<10;i++) { f("hello"); } See http://www.webber-labs.com/wp-content/uploads/2015/08/mpl-02.pdf#page=4 "the cat eats a dog" ==> // left derivation ==> ==> the ==> the cat ==> the cat eats ==> the cat eats ==> the cat eats a ==> the cat eats a dog // parse tree / | \ / | \ / \ | / \ / \ eats / \ | | | | the cat a dog