Implement curry<N>(f) where N is f's arity.

Signed-off-by: Scott Prager <splinterofchaos@gmail.com>
Implement make_curried_n<N,F>.

...where F is a function of arity N.

Change ftl::fmap to use this over curried_binf to test it.

Signed-off-by: Scott Prager <splinterofchaos@gmail.com>
Make make_curried_n public and document.

Signed-off-by: Scott Prager <splinterofchaos@gmail.com>
Add make_curried_n test to prelude_tests.cpp.

Simplify make_curried_n slightly.

Signed-off-by: Scott Prager <splinterofchaos@gmail.com>
Document curry<N>(f).

Signed-off-by: Scott Prager <splinterofchaos@gmail.com>
Remove monomorphic requirement on curry<N>(f).

It may be used by std::functions or function pointer (albeit unnecessary
given the other overloads of curry), so do not restrict it.

Signed-off-by: Scott Prager <splinterofchaos@gmail.com>
Reimplement make_curried_n in terms of curry.

Simplify make_curried_n<N,F> by calling curry<N>(f) and applying the
arguments to that rather than explicitly constructing a
curried_fn_n<N,F> with _dtl::part(f,x...).

Signed-off-by: Scott Prager <splinterofchaos@gmail.com>
Merge branch 'curry'.

Includes new curry(f) overload, curry<N>(f) for currying N-ary
functions, and the type make_curried_n<N,F> for making automatically
curried function objects.