Creating a program from examples