While Loop Functional Programming Vs Object Oriented