This work is just for fun as a way to learn R's metaprogramming some more. I am trying to implement list comprehensions like you might see in Haskell or Python. I am just not sure how to fix one tiny part of the process. I am following this example implementation of %>% with some changes. Here's the code:

```
library(rlang)
`%c|%` <- function(lhs, rhs){
lhs <- (substitute(lhs))
rhs <- (substitute(rhs))
if (rhs[[1L]] == ".") rhs[[1]] = quote(list)
e <- expr(purrr::pmap(!!rhs, \(x, y) !!lhs))
eval(e, envir = parent.frame())
}
c(x, y) %c|% .(x = 1:2, y = 10:11)
# returns as expected
[[1]]
[1] 1 10
[[2]]
[1] 2 11
```

As you might notice, the problem is that I've had to hardcode in `\(x, y)`

myself. I can't figure out how to have that created programmatically similar to the rest of the setup. Another problem with this is I'd like the operator to work even if extraneous variables are provided. E.g.:

```
> c(x, y) %c|% .(x = 1:2, y = 10:11, z = letters[1:2])
Error in `purrr::pmap()`:
ℹ In index: 1.
Caused by error in `.f()`:
! unused argument (z = .l[[3]][[i]])
```

I've been going through the Metaprogramming chapters of Advanced R, but can't seem to find the solution. I want to replace the hardcoded `\(x, y)`

with something that will be created based on the named parameters on the right-hand side. So in the above example, I would need to create `\(x, y, z)`

or `function(x, y, z)`

.