Functional Methods on Collections
I’m learning Scala and am a little bewildered by all the methods (higher-order functions) available on the collections. Which ones produce more results than the original collection, which ones produce less, and which are most appropriate for a given problem? Though I’m studying Scala, I think this would pertain to most modern functional languages (Clojure, Haskell) and also to Java 8 which introduces these methods on Java collections.
What’s special about currying or partial application?
I’ve been reading articles on Functional programming everyday and been trying to apply some practices as much as possible. But I don’t understand what is unique in currying or partial application.
Who first coined the term Higher Order Function and/or First Class Citizen?
I’ve come to understand that long before Haskell, O’Caml or LISP, higher order functions were an academic research subject and in mathematics, Schönfinkel (in 1967) and Haskell Curry (in 1968) already applied techniques such as currying, but that was before it was available in any programming language.
Origin of common list-processing function names
Some higher-order functions for operating on lists or arrays have been repeatedly adopted or reinvented. The functions map, fold[l|r], and filter are found together in several programming languages, such as Scheme, ML, and Python, that don’t seem to have a common ancestor. I’m going with these three names to keep the question focused.
Origin of common list-processing function names
Some higher-order functions for operating on lists or arrays have been repeatedly adopted or reinvented. The functions map, fold[l|r], and filter are found together in several programming languages, such as Scheme, ML, and Python, that don’t seem to have a common ancestor. I’m going with these three names to keep the question focused.
Origin of common list-processing function names
Some higher-order functions for operating on lists or arrays have been repeatedly adopted or reinvented. The functions map, fold[l|r], and filter are found together in several programming languages, such as Scheme, ML, and Python, that don’t seem to have a common ancestor. I’m going with these three names to keep the question focused.
Origin of common list-processing function names
Some higher-order functions for operating on lists or arrays have been repeatedly adopted or reinvented. The functions map, fold[l|r], and filter are found together in several programming languages, such as Scheme, ML, and Python, that don’t seem to have a common ancestor. I’m going with these three names to keep the question focused.
Passing a Scala function to a Java 8 method
The following Scala code works and can be passed to a Java method expecting a function. Is there a cleaner way to do this? Here’s my first pass:
Passing a Scala function to a Java 8 method
The following Scala code works and can be passed to a Java method expecting a function. Is there a cleaner way to do this? Here’s my first pass:
Passing a Scala function to a Java 8 method
The following Scala code works and can be passed to a Java method expecting a function. Is there a cleaner way to do this? Here’s my first pass: