Implementation/translation of the $s^1_1$
Roughly, s11 a program which takes as its first argument a representation of a 2-arguments program e.g. a string like

def foo(x,y):
   return g(x,y)


and a number n as its second argument. 

The result of s11 is the representation of another program, obtained by "hard-coding" the value n for x in the source code, effectively removing the argument x. In the example above we would get the string

def newFoo(y):
   return g(n,y)


or something equivalent to that, e.g.

def newFoo(y):
   return foo(n,x)
def foo(x,y):  # original code unaffected
   return g(x,y)


The code posted by the OP does this using LISP lambdas. The part

(let ((y (gensym)))


generates a new variable name y, while

(list 'lambda (list y) (list f x y))))


returns the representation of the function

$$
\lambda y.\ f (x, y)
$$

where x is the value to "hard-code" (the one which we called n above).

The representation is a LISP s-expression / tree instead of a string, but the concept is the same. LISP is famous for being able to express code as data (roughly as an AST), and being able to run it in a simple way (homoiconicity).