Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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
1  
"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
1  
add comment

1 Answer

up vote 9 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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