Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which problems domains are more suited to functional programming solutions and why? Can anyone provide any examples?

EDIT Just to clarify, I'm not asking for a list of problems. I want to know what type of problems are best suited to functional solutions. For example I have heard financial problems are solved well with functional programming.

share|improve this question

closed as too broad by MichaelT, gnat, JB King Dec 4 '15 at 18:16

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
"List of" questions where each answer is equally valid aren't suited to the Stack Exchange format. What specific problem are you trying to solve here? – ChrisF Oct 11 '11 at 22:14
2  
up vote 10 down vote accepted

Functional programming uses immutable datastructures and doesn't rely on mutable state, this means that the programs are easier to reason about and easier to prove for correctness.

Functional programming is easiest to use for stateless problems, e.g. programs that takes an input and generates an output without a need for side effects. Typical problem domains are compilers and stateless servers. Or libraries for calculations.

share|improve this answer

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