Question: I'm directing users to a page on my site from email (possibly an email client). When they reach the site they are presented with login screen and the address where they were headed is lost. 

How can I capture the entire address that they were trying to visit, so that I can redirect them to it once they log in?

Answer: 
Here's a class

```
.A <-
    setRefClass("A",
                fields=list(x="numeric"),
                methods=list(foo=function() x))

```

If I had an instance `a` and wanted to construct a call to the 'foo' method using '$' I could

```
eval(substitute(a$FUN(), list(FUN="foo")))

```

So I'll create a class `Alist` that is meant to have a list of elements of class `A` (this could be enforced programmatically), and that has a `.delegate` method that'll apply an arbitrary method to all elements of the list. I'll then add a method that delegates `foo`.

```
.delegate <- function(FUN, ...)
{
    lapply(elts, function(elt, ...) {
        eval(substitute(elt$FUN(...), list(FUN=FUN, ...)))
    })
}

.Alist <-
    setRefClass("Alist",
                fields=list(elts="list"),
                methods=list(
                  initialize = function(...) callSuper(elts=list(...)),
                  .delegate = .delegate,
                  foo=function() .delegate("foo")))

```

And then use it

```
> aList <- .Alist$new(.A$new(x=1), .A$new(x=2))
> aList$foo()
[[1]]
[1] 1

[[2]]
[1] 2

```
Report as bug on r-devel so John Chambers can fix it.