## These are equivalent:
trajectory() %>%
wait_n(3)
trajectory() %>%
wait() %>%
wait() %>%
wait()
## These are equivalent:
trajectory() %>%
wait_until("green")
trajectory() %>%
trap("green") %>%
wait() %>%
untrap("green")
## These are equivalent:
trajectory() %>%
wait_until(c("one", "another"), 2)
trajectory() %>%
trap(c("one", "another")) %>%
wait() %>%
wait() %>%
untrap(c("one", "another"))
Run the code above in your browser using DataLab