esolang
Learn · LessonsLesson 11 of 18

Lesson 11

Code is data in Underload

^ pops a text and runs it as a program. So (:*) is a function; run on (x), it doubles it.

The lesson

a wraps the top text in parentheses, turning data back into source. In the example (x)(:*)^ runs :* on (x), leaving (xx).

Underload has its own page, and Run opens this example in the editor.

Example

Output


Exercise 1

Print eight x characters with only one x in your program.

Run tries your program on the input below. Check runs it on every test.

The tests it must pass
InputExpected output
(empty)xxxxxxxx

Output


A hint

Doubling three times is eight.

One answer

Answer: Print eight x characters with only one x in your program.

Expected output

xxxxxxxx
The tests it must pass
InputExpected output
(empty)xxxxxxxx

Output


Exercise 2

Print ((hi)).

Run tries your program on the input below. Check runs it on every test.

The tests it must pass
InputExpected output
(empty)((hi))

Output


A hint

Each a adds one pair of parentheses.

One answer

Answer: Print ((hi)).

Expected output

((hi))
The tests it must pass
InputExpected output
(empty)((hi))

Output


Read more