Q:

function call within a function in R

This is an example from Hadley's latest book (Advanced R). I hope he does not mind that I posted it. 
I am having difficulty to understand why this code snippet does what it does.
Could someone expand on this? How can I divide it into mini steps?
add <- function(x) {

    function(y) x+y
}

adders <- lapply(1:10,add)

I understand a simpler call to "add" function.
> add(2)(1)

[1] 3

In a way, 2 is assigned to x and 1 is assigned to y.
When we use this function with lapply (this way), how does y get assigned a value?

A:

This doesn't do quite what you first think. Intuition suggests that the call to lapply would return a list of functions which add 1, 2, 3, ..., 10 to their argument.
In fact, lapply(1:10,add) returns a list of functions, each of which adds 10 to their argument.
In the console, I tried a simpler version
> v<-lapply(1:3, add)
> v
[[1]]
function (y) 
x + y
<environment: 0x28b0540>

[[2]]
function (y) 
x + y
<environment: 0x28af678>

[[3]]
function (y) 
x + y
<environment: 0x28af800>
> v[[1]](1)
[1] 4
> v[[2]](1)
[1] 4
> v[[3]](1)
[1] 4
> 

It's hard to see the use of this result.

