tests2/switch.R

f =
function(i)
{
   x = switch(i,
            '2' = 12,
            '3' = i * 1.5,
            '8' = i/2)

   x
}

library(R2llvm)
fc = compileFunction(f)
duncantl/R2llvm documentation built on May 14, 2019, 9:42 a.m.