mlr-org / mlr3misc

Miscellaneous helper functions for mlr3
https://mlr3misc.mlr-org.com
GNU Lesser General Public License v3.0
11 stars 2 forks source link

crate() function in mlr3misc #50

Closed mb706 closed 3 years ago

mb706 commented 3 years ago

I wrote something similar to carrier::crate here. The difference is that .fn does not need to be a verbatim function definition, with the cost that all values being used need to be declared in .... Do we want this in mlr3misc? I think it would be generally helpful in places where functions are given to objects, e.g. in ParamUty constructor argument custom_check.

mb706 commented 3 years ago

(is the name collision with carrier a problem?)

mllg commented 3 years ago

Yep, seems useful. I don't think that the name clash will be a problem.