Everybody says that pattern matching is a great feature in functional languages. Why? Can’t I simple use ifs and switch cases for everything? I’d like to understand the advantages of using pattern matching instead of regular procedural programming ifs and switch cases Answer I’d first like t…
Tag: functional-programming
zip function for Java
Is there some standard API or established third party library (I am thinking commons or Guava) that provides in Java the equivalent of zip or map vector function in languages like Ruby or Clojure? So the signature (for two collections) would be: where Pair would also be presumably defined in that library. I k…
Can anyone explain me what is state and mutable data?
In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. http://en.wikipedia.org/wiki/Functional_programming Can anyone explain me what is state and mutable data? Can anyone give me examples in …