Dear Rcppusers,
  When i am learning Rcpp , i meet the following function, i can't figure out 
its use, May you explain to me ?
int f4(Function pred, List x) {
int n = x.size();

  for(int i = 0; i < n; ++i) {
    LogicalVector res = pred(x[i]);
    if (res[0]) return i + 1;
  }
  return0;
}



--

PO SU
rcppm...@163.com
Majored in Statistic Shanghai JiaoTong University

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to