tests/testit/test-function_type.1.R

rm(list=ls())

assert('function_type_1', {
  seq.gen(start) %::% a : Function
  seq.gen(start) %as%
  {
    value <- start - 1
    function() {
      value <<- value + 1
      return(value)
    }
  }
  seal(seq.gen)

  act <- seq.gen(1)
  ('function' %in% class(act))
})

Try the lambda.r package in your browser

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

lambda.r documentation built on Sept. 18, 2019, 5:02 p.m.