test_that("compose", {
f = compose(function(x) x + 1, function(x) x / 2)
expect_equal(f(10), 6)
f = compose(sqrt)
expect_equal(f(4), 2)
expect_error(compose(), "length")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.