libfn / functional

Extending C++ library for functional programming
ISC License
60 stars 8 forks source link

Add `fn::invoke` and `fn::invocable` with unified support for `fn::sum` and `fn::pack` #40

Closed Bronek closed 7 months ago

Bronek commented 7 months ago

We currently need to write different invoke syntax for each of:

Ideally this should be pulled into different overloads of fn::invoke (and corresponding specializations of fn::invocable and fn::invocable_r), which will enable us to simplify lots of things (e.g. implementation of fn::optional , fn::expected and many|all the functors).

Eventually we will propose to add this functionality into std::invoke (and family)

Bronek commented 7 months ago

Implemented in #44