Dandy (NY) Interview Question

Create your own implementation of flatmap