Introduction
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.

Y Combinator for
Non-programmers

Beginner 1: Mathboxes

Slide 1 / 12

Welcome!

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?

Introduction·
·Beginner 2
Slide 2 / 12

Once upon a time…

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

Let me explain how it works.

Slide 3 / 12

How mathboxes work

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

The Run button

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

The “Plus 1” feature

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
Slide 6 / 12

The “Minus 1” feature

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
Slide 7 / 12

How can we calculate this?

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: Use twice

Answer: To calculate , use twice on .

Here’s an example. Try pressing Run :

The result is . So it calculated .

Slide 9 / 12

Use and as many times as you like

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

Calculate any addition or subtraction

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

The villagers were very bad at math

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.”

The villagers couldn’t live without mathboxes.

Note: Unfortunately, mathboxes cannot do multiplications or divisions .

Slide 12 / 12

The third feature of a mathbox

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!
Introduction
Japanese Site (日本語版) · About this Site · Twemoji