[Roxygen-commits] r45 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 19 07:51:01 CEST 2008


Author: pcd
Date: 2008-06-19 07:51:01 +0200 (Thu, 19 Jun 2008)
New Revision: 45

Modified:
   pkg/R/functional.R
   pkg/R/parse.R
Log:
parse.files, compose


Modified: pkg/R/functional.R
===================================================================
--- pkg/R/functional.R	2008-06-19 03:55:58 UTC (rev 44)
+++ pkg/R/functional.R	2008-06-19 05:51:01 UTC (rev 45)
@@ -8,3 +8,12 @@
 ## Borrowed from src/library/base/R/funprog.R for pre-2.7 Rs.
 Negate <- function(f)
   function(...) ! match.fun(f)(...)
+
+## My Happy Hacking keyboard gave out during the writing of this
+## procedure; moment of silence, please.
+Compose <- function(...) {
+  fs <- list(...)
+  function(...) Reduce(function(x, f) f(x),
+                       fs,
+                       ...)
+}

Modified: pkg/R/parse.R
===================================================================
--- pkg/R/parse.R	2008-06-19 03:55:58 UTC (rev 44)
+++ pkg/R/parse.R	2008-06-19 05:51:01 UTC (rev 45)
@@ -206,3 +206,6 @@
                               srcfile=srcfile))$srcref
   parse.refs(zip.list(prerefs(srcfile, srcrefs), srcrefs))
 }
+
+parse.files <- function(...)
+  Reduce(append, Map(parse.file, list(...)), NULL)



More information about the Roxygen-commits mailing list