RosettaCodeData/Task/Higher-order-functions/R/higher-order-functions.r
2023-07-01 13:44:08 -04:00

6 lines
142 B
R

f <- function(f0) f0(pi) # calc. the function in pi
tf <- function(x) x^pi # a func. just to test
print(f(sin))
print(f(cos))
print(f(tf))