Write a Program that Writes a function BUT in a different language!
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.