tests/testthat/test-pipe.R

test_that("native pipe", {
    1:5 |>
    vapply(\(x) x <= 1, logical(1)) %->%
    c(x, ..y)

  expect_equal(x, TRUE)
  expect_equal(y, list(FALSE, FALSE, FALSE, FALSE))
})

Try the zeallot package in your browser

Any scripts or data that you put into this service are public.

zeallot documentation built on June 8, 2025, 1:36 p.m.