I've been wondering how to determine if I know functional programming. By know I mean in a Journeyman sense, not a master, but competent enough to do the work.

I like languages w/ query/data shaping constructs built in, but is knowing the ins and outs of maps, filters, and aggregates in the form of Linq, Sql, and Reactive Extensions sufficient to claim that one knows functional programming? Or are additional specific concepts and skills required?

Edit: I've been working in OO and languages that identify primarily as OO langs for 15 years. As I'm not in an env that is self-identified as functional, there's little to measure against.

Is avoiding immutable state and knowing how to use fold all there is?

closed as primarily opinion-based by Ixrec, GlenH7, user40980, durron597, user22815 May 23 '15 at 4:17

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Try writing something nontrivial in Haskell. If you can figure your way out, you're there. – Federico klez Culloca Jul 24 '11 at 17:33
  • Excellent question! voting up. – Chiron Jul 24 '11 at 19:57
  • Federico, must it be Haskell, what's an example of nontrival? – Scott Weinstein Jul 24 '11 at 20:30
  • Is evaluating how well someone knows functional programming any different than evaluating how well someone knows object-oriented programming, procedural programming, or aspect-oriented programming? – Thomas Owens Jul 25 '11 at 0:46
  • @Federico: your comment would make a very good answer if more detail was added. – Larry Coleman Jul 25 '11 at 9:47

Dakotah's answer is important and I would like to add a couple of things:

  • Understanding Monads.
  • Understanding Tail call optimization (TCO) and why it does matter and how the language in question implements it.
  • Understanding persistent data structures and how to implement a one by hand.

I'm pretty sure there are a lot of things, please feel free to complete the list.


The first step to be able to recognize the difference between imperative and functional styles in code. For example, Odersky in Programming in Scala highlights that one telltale sign is

that if code contains any vars [variables in Scala that can be modified] is is probably imperative style. If the code contains no vars at all--i.e., it contains only vals--it is probably in a functional style. One way to move towards a functional style, therefore, i s to try to program without vars.

For example, consider this while loop:

var i = 0
while (i < args.length) {

The var is the sign it is imperative. This is Scala would become

def printargs(args: Array[String]): Unit = {

But this code isn't purely functional yet because it has side effects.

From a functional point of view this should be:

def formatArgs(args: Array[String]) = args.mkString("\n")

So ... to determine if you know functional programming, are you writing code without the equivalent of vars and no local side effects!?

Not the answer you're looking for? Browse other questions tagged or ask your own question.