R Under development (unstable) (2023-09-01 r85046 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(mirai.promises) > `%...>%` <- promises::`%...>%` > nanotest <- function(x) invisible(x || stop("is not TRUE when expected to be TRUE")) > nanotest(promises::is.promise(p1 <- promises::as.promise(mirai::mirai("completed")))) > nanotest(promises::is.promise(p2 <- mirai::mirai("completed") %...>% identity())) > nanotest(mirai.promises:::..[["freq"]] == 0.1) > nanotest(is.null(polling(freq = 1000))) > nanotest(mirai.promises:::..[["freq"]] == 1L) > nanotest(is.null(polling())) > nanotest(mirai.promises:::..[["freq"]] == 0.1) > Sys.sleep(3L) > > proc.time() user system elapsed 0.32 0.06 3.46