tests/testthat/test-higherOrderFunctions.R

test_that("Create a Mutator Function works", {
    mutator <- createMutator(function(x, y) x + y)
    var <- 5
    mutator(var, 3)
    expect_equal(var, 8)
})

Try the FastUtils package in your browser

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

FastUtils documentation built on Sept. 11, 2024, 5:13 p.m.