search for: tailr_env

Displaying 6 results from an estimated 6 matches for "tailr_env".

Did you mean: mail_env
2018 Feb 27
2
Parallel assignments and goto
....tailr_n ? ? ? ? ? ? acc <- .tailr_acc ? ? ? ? ? ? if (n <= 1) { ? ? ? ? ? ? ? ? escape(acc) ? ? ? ? ? ? } else { ? ? ? ? ? ? ? ? .tailr_n <<- n - 1 ? ? ? ? ? ? ? ? .tailr_acc <<- n * acc ? ? ? ? ? ? } ? ? ? ? } ? ? }) } factorial_tr_automatic_2 <- function(n, acc = 1) { ? ? .tailr_env <- rlang::get_env() ? ? callCC(function(escape) { ? ? ? ? repeat { ? ? ? ? ? ? if (n <= 1) { ? ? ? ? ? ? ? ? escape(acc) ? ? ? ? ? ? } else { ? ? ? ? ? ? ? ? .tailr_env$.tailr_n <- n - 1 ? ? ? ? ? ? ? ? .tailr_env$.tailr_acc <- n * acc ? ? ? ? ? ? ? ? .tailr_env$n <- .tailr_env$.tail...
2018 Feb 27
0
Parallel assignments and goto
...if (n <= 1) { > escape(acc) > } else { > .tailr_n <<- n - 1 > .tailr_acc <<- n * acc > } > } > }) > } > > factorial_tr_automatic_2 <- function(n, acc = 1) { > .tailr_env <- rlang::get_env() > callCC(function(escape) { > repeat { > if (n <= 1) { > escape(acc) > } else { > .tailr_env$.tailr_n <- n - 1 > .tailr_env$.tailr_acc <- n * acc >...
2018 Feb 26
0
Parallel assignments and goto
...lt;= 1) { ? ? ? ? ? ? ? ? escape(acc) ? ? ? ? ? ? } else { ? ? ? ? ? ? ? ? .tailr_n <- n - 1 ? ? ? ? ? ? ? ? .tailr_acc <- n * acc ? ? ? ? ? ? ? ? n <- .tailr_n ? ? ? ? ? ? ? ? acc <- .tailr_acc ? ? ? ? ? ? } ? ? ? ? } ? ? }) } factorial_tr_automatic_2 <- function(n, acc = 1) { ? ? .tailr_env <- rlang::get_env() ? ? callCC(function(escape) { ? ? ? ? repeat { ? ? ? ? ? ? if (n <= 1) { ? ? ? ? ? ? ? ? escape(acc) ? ? ? ? ? ? } else { ? ? ? ? ? ? ? ? .tailr_env$.tailr_n <- n - 1 ? ? ? ? ? ? ? ? .tailr_env$.tailr_acc <- n * acc ? ? ? ? ? ? ? ? .tailr_env$n <- .tailr_env$.tail...
2018 Feb 11
4
Parallel assignments and goto
...not the new values until the assignments are all done ? and one related to restarting a loop from nested loops or from nested expressions in `with` expressions or similar. I can implement parallel assignment using something like rlang::env_bind: factorial_tr_2 <- function (n, acc = 1) { .tailr_env <- rlang::get_env() repeat { if (n <= 1) return(acc) else { rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) next } } } This reduces the number of additional variables I need to one, but is a couple of orders of magnit...
2018 Feb 11
0
Parallel assignments and goto
...assignments are all done ? and one related to restarting a loop from nested loops or from nested expressions in `with` expressions or similar. > > I can implement parallel assignment using something like rlang::env_bind: > > factorial_tr_2 <- function (n, acc = 1) > { > .tailr_env <- rlang::get_env() > repeat { > if (n <= 1) > return(acc) > else { > rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) > next > } > } > } > > This reduces the number of additional variables I n...
2018 Feb 14
0
Parallel assignments and goto
...gnments are all done ? and one related to > restarting a loop from nested loops or from nested expressions in `with` > expressions or similar. > > I can implement parallel assignment using something like rlang::env_bind: > > factorial_tr_2 <- function (n, acc = 1) { > .tailr_env <- rlang::get_env() > repeat { > if (n <= 1) > return(acc) > else { > rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) > next > } > } > } > > This reduces the number of additional variab...