context("discard")
test_that("discard filters out elements.", {
result <- transduce(discard(function(x) x <= 19), as_sum, 1:20, init = 0)
expect_that(result, is_equivalent_to(20))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.