My first language, 20 years ago or so, was C. I got the Borland C compiler, and the ‘C for Dummies’ when I was 10. My mom is a geophysicist, who worked with FORTRAN at the time (don’t worry, she’s using Python now). She figured that it would be a good place to start. There really weren’t a lot of well-known choices at the time — if you didn’t know what to look for or know someone who did, it didn’t exist. In any case, I struggled hard — C is a tough language for a 10 year old. I remember banging on it for years, cargo-culting my way through the most fundamental examples involving pointers. What I’m trying to say is… I didn’t start out as a functional programming wunderkind, I fought my way through problems in C, loving the loop. programming book for Enough reminiscing… we should probably clarify some things. Programming is instructing a computer to perform on . For example, you might want to “capitalize every word in this list”. The way to instruct a computer to do this might look like: actions things set i = 1set l = length(list) # call the 'length' function loop:list[i] = capitalize(list[i]) # list[i] means get an itemi = i + 1goto(loop) if i < l In this example, the are: things : where we are in the list i : the list itself list (kinda) : a place in the code, that we can go to loop And the are: actions : tells you how long a list is length : capitalizes a word capitalize (also kinda) : move to a position goto Let’s say we want to take every word in a list and make it lower case… we’d have to copy most of the code from above, and just replace with . capitalize downcase So why do we have to do this? Why can’t we just make an “action” that just says “perform this some action to every element in a list”. We can! And that is functional programming. The fundamental leap (and required language feature) is to start thinking about “actions” as just another kind of “thing”. As soon as you can pass an action into another action you’re thinking functionally. So, in a functional language, we get a new ‘action’, called , which takes an action and a list: map set capitalized = map(capitalize,list)set lowercased = map(downcase,list) What Map does in this example, is execute or on every item in . The basic difference is that in a functional language, you can just read , and understand that what it is doing is simple, just run every item in a list through another function. It’s simple and clear. In Javascript, a functional language, the two side-by-side look like this: capitalize downcase list map function upcase(string) {return string.toUpperCase();} // Functional: var allUppercase = list.map(upcase); // Imperative: var allUppercase = [];for(var i = 0 ; i < list.length ; i++) {allUppercase[i] = upcase(list[i]);} I’ll be honest — it’s not much more to read through the logic, I know that at some point you stop reading each word, and you just see the code for what it is (blonde, brunette redhead…). However, with more complicated programs, it’s a lot nicer to represent complex actions as combinations of simpler actions, and the only way to do that is if you treat as just another kind of I’m so used to thinking this way, that not being allowed to is an instant turnoff. that for actions thing. After writing code this way for a few years, I miss it every time I have to work on codebases that aren’t built in this way. When I’m embroiled in unraveling the mysteries of a 2-deep for loop, part of me wishes I had never learned functional programming. A very small part… but it’s there.