You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nofrills::fn() is a simple quasiquotation-enabled function constructor. Though its use is not strictly necessary, it facilitates a very succinct definition of partial().
It would be nice if
partial()
were augmented to comprehend quasiquotation, in a way that:(Additionally, in the degenerate case where no partialized arguments are supplied,
partial()
should simply applyas_mapper()
.)One possibility is as follows:
Remarks:
nofrills::fn()
is a simple quasiquotation-enabled function constructor. Though its use is not strictly necessary, it facilitates a very succinct definition ofpartial()
.This version of
partial()
is compatible with byte-compiled functions (a difficulty I'd overlooked in partial() fails for functions that introspect context #349).Issues Argument matching in partial() doesn't happen for primitive functions #360, option to force evaluation of supplied function in partial to avoid infinite recursion #387 are addressed.
Some examples showing quasiquotation and compatibility with the current behavior:
(For now, I'm omitting a better print method to focus on the main point.)
The text was updated successfully, but these errors were encountered: