## Question from Pierce's Types and Programming Languages

On page 56 at the top of the page he has the reduction:

( Î»x . x ( Î»x . x ) )( u r ) evaluates to u r ( Î»x . x )

My question is:

I see how the lhs can be written as: (id(id))(ur) which is then (id)(ur). What I don't get is: (id)(ur) = (ur)(id). Is the point that the identity term is commutative in this context? Is this the same idea as the composition operation between functions in that the composition of two functions is generally not commutative, but the identity function is always commutative?

## Comment viewing options

### I see how the lhs can be

I see how the lhs can be written as: (id(id))(ur)

Actually it can't - ( Î»x . x ( Î»x . x ) ) is "apply parameter to id".

### Oh I see, it's like this:

Oh I see, it's like this:

( Î»x . x t )( v ) evaluates to v t

where t = Î»x.x and v = ur

Thanks