An implementation of Rcpp 'sugar'.