tests/testit/test-infix.1.R

rm(list=ls())

assert('infix.1', {
  a %mod% b %:=% { a %/% b }
  seal(`%mod%`)

  act <- 5 %mod% 2
  exp <- 5 %/% 2
  (act == exp)
})

assert('infix.2', {
  a %mod% b %as% { a %/% b }
  seal(`%mod%`)

  act <- 5 %mod% 2
  exp <- 5 %/% 2
  (act == exp)
})

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.