context("test for lgenerator")
f <- lforce
l <- liota(10)
lfib <- 0 %:% (1 %:% lzipWith(`+`, lfib, ltail(lfib)))
test_that("test", {
expect_identical(f(0%..%9), f(l))
expect_identical(f(liota(10, 2, 3)), f(larith(2, 5, 30)))
expect_identical(f(liota(10, 2, 3)), f(lrange(2, 3, 30)))
expect_identical(f(larith(2, 5, 30)), f(lrange(2, 3, 30)))
expect_equal(
lseq_gen(0, 1, f = function(x, y) x + y) %!!% 10,
lfib %!!% 10)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.