Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
From http://markmail.org/message/ion6fk6hroh5zmzn
Java 8 (project lambda) [1] and Google Guava [2] have a default arity of 1 for these interfaces (i.e. Function is a unary function). But in [functor] the default arity is 0 (i.e. nullary).
It would be a good idea for [functor] to have a similar behaviour to the other API's, so users and developers can use the interfaces with less hassle.
Other functional programming languages let the user specify the arity when declaring the function (like in Haskell), but in [functor] we have special interfaces per arity.
[1] http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Function.html#apply(F)
[2] http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Function.html#apply(F)