Add a new example with a loop distribution case

With this example, most core functions are illustrated by a test case.