Hello! This is page 2 of the course called “Y Combinator for Non-programmers”. If you just got here, click here to read from the beginning.

Non-programmers

Slide 1 / 12

In this course, we’ll learn about Y Combinator through a short story. Let’s first talk about “mathboxes”, one of the key items of this story.

Mathboxes

Looking for some other page?

Slide 2 / 12

Once upon a time, there was a rural village called “Lambda Village”.

Lambda Village and the villagers

In Lambda Village, a tool called “Mathbox” has been passed down from one generation to next. As its name suggests, a mathbox is a magical tool that can solve math questions. You can think of it as a simple calculator.

Mathbox is a magical tool

that can solve math questions

that can solve math questions

Let me explain how it works.

Slide 3 / 12

Here’s an example mathbox:

A mathbox

- There’s on the top, and
- There’s a “plus 1” icon on the bottom.

Before I explain what these icons mean, let’s talk about how we can run this mathbox.

Slide 4 / 12

Each mathbox has a Run button. If you press it, the mathbox calculates the result. Try pressing Run on the mathbox below.

The result is . That means it calculated .

Let’s look at other mathboxes. Try pressing Run on this one:

The result is , which means it calculated .

Slide 5 / 12

Summary: Suppose that you have a mathbox like below:

- There’s some number on the top, and…
- There’s on the bottom. That means…
- If you run it, the result will be .

If you run it…

The result will be

This is the first feature of mathbox: the “Plus 1” feature . It lets you add to some number.

The “Plus 1” feature :

Adds to some number

Adds to some number

Slide 6 / 12

Mathboxes can also subtract 1 from a number. Try pressing Run below:

The result is . So it calculated .

Summary: If you combine with , it will calculate .

Calculates

This is the second feature of mathbox: the “Minus 1” feature . It lets you subtract from some number.

The “Minus 1” feature :

Subtracts from some number

Subtracts from some number

Slide 7 / 12

Now, here’s a question: Can you think of a way to calculate something like using a mathbox?

How do you calculate this using a mathbox?

Slide 8 / 12

Answer: To calculate , use twice on .

Here’s an example. Try pressing Run :

The result is . So it calculated .

Slide 9 / 12

You can use both and as many times as you like.

Example: This one uses three times to calculate .

Calculates

Another example: This one uses four times to calculate .

Calculates .

Slide 10 / 12

By using and many times, you can calculate any addition or subtraction, no matter how large the numbers are .

Example: Suppose that you want to calculate . What would the mathbox look like?

Answer: Combine with ten ’s.

Use ten times

Slide 11 / 12

Summary: A Mathbox is a magical tool that can calculate additions and subtractions.

Mathboxes can do additions and subtractions

Why mathboxes were important: The villagers in Lambda Village were all very bad at math. They even had to rely on mathboxes to calculate simple additions like .

“We suck at math, so we must use

mathboxes to do even simple additions.”

mathboxes to do even simple additions.”

The villagers couldn’t live without mathboxes.

Note: Unfortunately, mathboxes cannot do multiplications or divisions .

Slide 12 / 12

It turns out that mathboxes have one more feature other than the “Plus 1” feature and the “Minus 1” feature that we just described.

A mathbox has one more feature…

Let’s talk about this third feature on the next page.

Go to Next PageContinue to Beginner 2

4 more beginner levels left!