[Rcpp-commits] r3168 - pkg/Rcpp/inst/examples/Fibonacci

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Aug 6 19:52:45 CEST 2011


Author: edd
Date: 2011-08-06 19:52:45 +0200 (Sat, 06 Aug 2011)
New Revision: 3168

Modified:
   pkg/Rcpp/inst/examples/Fibonacci/fib.r
Log:
removed uncalled-for semicolons in R code


Modified: pkg/Rcpp/inst/examples/Fibonacci/fib.r
===================================================================
--- pkg/Rcpp/inst/examples/Fibonacci/fib.r	2011-08-02 15:22:06 UTC (rev 3167)
+++ pkg/Rcpp/inst/examples/Fibonacci/fib.r	2011-08-06 17:52:45 UTC (rev 3168)
@@ -31,9 +31,9 @@
 
 ## for comparison, the original (but repaired with 0/1 offsets)
 fibR <- function(seq) {
-    if (seq == 0) return(0);
-    if (seq == 1) return(1);
-    return (fibR(seq - 1) + fibR(seq - 2));
+    if (seq == 0) return(0)
+    if (seq == 1) return(1)
+    return (fibR(seq - 1) + fibR(seq - 2))
 }
 
 ## also use byte-compiled R function



More information about the Rcpp-commits mailing list