what is functional programmingwe' better start with the hardest question"what is functional programming (fp)anyway?one answer would be to say that functional programming is what you do when you program in languages like lispschemeclojurescalahaskellmlocamlerlangor few others that is safe answerbut not one that clarifies very much unfortunatelyit is hard to get consistent opinion on just what functional programming iseven from functional programmers themselves story about elephants and blind men seems apropos here it is also safe to contrast functional programming with "imperative programming(what you do in languages like cpascalc++javaperlawktcland most othersat least for the most partfunctional programming is also not object-oriented programming (oop)although some languages are both and it is not logic programming ( prolog)but again some languages are multiparadigm personallyi would roughly characterize functional programming as having at least several of the following characteristics languages that get called functional make these things easyand make other things either hard or impossiblefunctions are first class (objectsthat iseverything you can do with "datacan be done with functions themselves (such as passing function to another functionrecursion is used as primary control structure in some languagesno other "loopconstruct exists