search for: tailr_frame

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

2018 Feb 11
4
Parallel assignments and goto
...ther case, a call to `next` will not work in such a context. The expression will be evaluated inside `bind` or `with`, and not in the `list_lenght` function. A version that *will* work, is something like this factorial_tr_3 <- function (n, acc = 1) { .tailr_env <- rlang::get_env() .tailr_frame <- rlang::current_frame() repeat { if (n <= 1) rlang::return_from(.tailr_frame, acc) else { rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) rlang::return_to(.tailr_frame) } } } Here, again, for the factorial function...
2018 Feb 11
0
Parallel assignments and goto
...not work in such a context. The expression will be evaluated inside `bind` or `with`, and not in the `list_lenght` function. > > A version that *will* work, is something like this > > factorial_tr_3 <- function (n, acc = 1) > { > .tailr_env <- rlang::get_env() > .tailr_frame <- rlang::current_frame() > repeat { > if (n <= 1) > rlang::return_from(.tailr_frame, acc) > else { > rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) > rlang::return_to(.tailr_frame) > } > } > } >...
2018 Feb 26
0
Parallel assignments and goto
...xt` will not work in such a context. The expression will be evaluated inside `bind` or `with`, and not in the `list_lenght` function. > > A version that *will* work, is something like this > > factorial_tr_3 <- function (n, acc = 1) > { > .tailr_env <- rlang::get_env() > .tailr_frame <- rlang::current_frame() > repeat { > if (n <= 1) > rlang::return_from(.tailr_frame, acc) > else { > rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) > rlang::return_to(.tailr_frame) > } > } > } > > Here, again, for the factorial function since this is e...
2018 Feb 14
0
Parallel assignments and goto
...ot work in such a context. The expression will be evaluated > inside `bind` or `with`, and not in the `list_lenght` function. > > A version that *will* work, is something like this > > factorial_tr_3 <- function (n, acc = 1) { > .tailr_env <- rlang::get_env() > .tailr_frame <- rlang::current_frame() > repeat { > if (n <= 1) > rlang::return_from(.tailr_frame, acc) > else { > rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) > rlang::return_to(.tailr_frame) > } > } >...
2018 Feb 27
2
Parallel assignments and goto
.... The expression will be evaluated inside `bind` or `with`, and not in the `list_lenght` function. > > > > A version that *will* work, is something like this > > > > factorial_tr_3 <- function (n, acc = 1) > > { > > .tailr_env <- rlang::get_env() > > .tailr_frame <- rlang::current_frame() > > repeat { > > if (n <= 1) > > rlang::return_from(.tailr_frame, acc) > > else { > > rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) > > rlang::return_to(.tailr_frame) > > } > > } > > } > > > >...
2018 Feb 27
0
Parallel assignments and goto
...e `bind` or `with`, and not > in the `list_lenght` function. > > > > > > A version that *will* work, is something like this > > > > > > factorial_tr_3 <- function (n, acc = 1) > > > { > > > .tailr_env <- rlang::get_env() > > > .tailr_frame <- rlang::current_frame() > > > repeat { > > > if (n <= 1) > > > rlang::return_from(.tailr_frame, acc) > > > else { > > > rlang::env_bind(.tailr_env, n = n - 1, acc = acc * n) > > > rlang::return_to(.tailr_frame) > > > } > >...