currying an uncurried implementation function; and
performing type checking at run time.
At the time of this project's inception in 2015 it seemed unreasonable to require users to provide curried implementation functions. Defining curried functions manually was onerous prior to ES6:
The landscape has changed since 2015, and it's now reasonable to assume that users are targeting ES6. Furthermore, the advantages of Ramda-style currying over simple currying do not justify the additional complexity. There's no compelling reason for def to continue to serve two roles.
User-facing changes:
$ functions must now be applied to arguments one at a time;
def now requires a curried implementation function;
def no longer imposes an arbitrary arity limit;
def functions must now be applied to arguments one at a time; and
__ has been removed (simple currying precludes placeholders).
Internal changes:
the checkTypes option is now checked in just one place; and
def is now essentially a no-op if type checking is disabled.
This pull request embraces the f (x) (y) style proposed in sanctuary-js/sanctuary#438.
The changes to the test suite will be easier to review once #178 has been merged.
Commit message:
This pull request embraces the
f (x) (y)
style proposed in sanctuary-js/sanctuary#438.The changes to the test suite will be easier to review once #178 has been merged.