Skip to content

Instantly share code, notes, and snippets.

View DominikRafacz's full-sized avatar
🕶️
Enjoying life

Dominik Rafacz DominikRafacz

🕶️
Enjoying life
View GitHub Profile
@DominikRafacz
DominikRafacz / funs.R
Created July 25, 2022 21:38
Curious matching fun case
fun_wants_num <- function(x) {
x + 1
}
fun_wants_fun_but_fails <- function(fun) {
fun(1)
}
fun_wants_fun <- function(fun) {
fun <- match.fun(fun)