Implement Factory pattern Write a program that represents an implementation of the Factory pattern based on lambdas.