Write a Program that Writes a function BUT in a different language! Write the shortest program that takes one input (n) from STDIN (or equivalent) and outputs a simple incrementing function with one argument (x) that returns x + n but the function must be in a different language. Pretty simple!

This is code-golf, normal rules apply, shortest program wins.

Example: >&lt;> to Python (Ungolfed)

!v"def i(x):"a"    return x+"ir!
 &gt;l?!;o


Input:

3


Output:

def i(x):
    return x+3


EDIT: Anonymous functions and lambda expressions are allowed!
GS2 &rarr; K, 2 bytes

•+


This prints a tacit, monadic function. The source code uses the CP437 encoding. Try it online!

Test run

$ xxd -c 2 -g 1 sum-func.gs2
00000000: 07 2b  .+
$ printf 42 | gs2 sum-func.gs2
42+
$ kona
K Console - Enter \ for help

  (42+) 69
111
  f : 42+
42+
  f 69
111


How it works

GS2


GS2 automatically reads from STDIN and pushes the input on the stack.
• indicates that the next byte is a singleton string literal.
Before exiting, GS2 prints all stack items.


K

Left argument currying is automatic in K.

Here, n+ turns the dyadic function + into a monadic function by setting its left argument to n.