---
title: "Solution Template (01)"
output: html_document
---
```{r corr_solutions, echo=FALSE}
rf <- function(n) {
  U <- runif(n)
  X <- U^(1/4)
  X
}
X <- rf(1e4)
```

```{r test00}
library(rlang)
```

```{r test01, autoharp.objs=c("rf", "X"), autoharp.scalars=c("lenX", "lenfn")}
lenX <- (length(X) == length(.X))
lenfn <- (length(fn_fmls(rf)) == length(fn_fmls(.rf)))
```

```{r test02, autoharp.scalars=c("mean.X", "sd.X")}
mean.X <- mean(X)
sd.X <- sd(X)
```

```{r test03, autoharp.scalars=c("for_loop")}
f1 <- rmd_to_forestharp(.myfilename)
for_loop <- fapply(f1, detect_for_in_fn_def, fn_name = "rf", combine=TRUE, 
                   combiner_fn = function(x) any(unlist(x)))
```
