Hello! This is page 15 of the course called â€śY Combinator for Non-programmersâ€ť. If you just got here, click here to read from the beginning.

Slide 1 / 13

### The most complicated lunchbox ever

The most complicated lunchbox ever

It will be hard, but you donâ€™t need to understand everything. Even if you donâ€™t fully get it, you should keep reading.

Looking for some other page?

Slide 2 / 13

### On the previous pageâ€¦

On the previous page, Saya came up with a lunchbox that might be able to reproduce the â€śRepeatâ€ť feature .

Can we reproduce this lunchbox that uses
the â€śRepeatâ€ť feature â€¦
â€¦with this lunchbox?
2
1
1234
4
3
2
1
12
1
12
2
1
1
12
2
1

According to Saya, the above lunchbox will repeat three times, just like when using the â€śRepeatâ€ť feature .

If you run this lunchboxâ€¦
2
1
1234
4
3
2
1
12
1
12
2
1
1
12
2
1
Just like the â€śRepeatâ€ť feature ,
it repeats three times on
123
3
2
1
And calculates

Letâ€™s see if this is actually true.

Slide 3 / 13

### What steps does it go through?

On this page, weâ€™ll run the lunchbox that I came up with, and see what steps it goes through.

When we run thisâ€¦
2
1
1234
4
3
2
1
12
1
12
2
1
1
12
2
1
What steps does it go throughâ€¦
â€¦before it becomes the same as
the â€śRepeatâ€ť feature ?
123
3
2
1

Yeah, we need to see what happens in between the beginning and the end.

Slide 4 / 13

### Letâ€™s run it!

Ok, letâ€™s do it.

• Weâ€™ll pause several times in between for explanation.
• You donâ€™t have to follow all the steps with your eyes. Just glance over it. Save your eyes!
• If you canâ€™t wait, press â€śSkip to the next stopping point â†’â€ť.

Press Run !

2
1
1234
4
3
2
1
12
1
12
2
1
1
12
2
1

Itâ€™s so complicatedâ€¦

Itâ€™s not too bad if you look carefully.

Take a look at this yellow section in the middle.

Take a look at this yellow section
in the middle
1245
5
3
12
2
1
1234
4
3
2
1
34
12
2
1
1234
4
3
2
1
2
1

Letâ€™s ignore this section for now. We donâ€™t need to worry about it until later.

Weâ€™ll replace it with the â€śIgnore for Nowâ€ť sign:

Ignore the yellow section for now
1234
4
Ignore
for Now
3
2
1

Itâ€™s much simpler now.

Now, letâ€™s take a look at the bottom section of the â€śConditionalâ€ť feature :

Because is , which is NOT zero, it chooses .

Check if is
1234
4
Ignore
for Now
3
2
1
Because is NOT , it chooses
1234
4
Ignore
for Now
3
2
1
123
3
Ignore
for Now
2
1
Slide 5 / 13

### The second time

Weâ€™ll now un-ignore the section we ignored earlier:

Un-ignore the section we ignored earlier
123
3
Ignore
for Now
2
1
134
4
2
12
2
1
1234
4
3
2
1
23
12
2
1
1234
4
3
2
1
1

Letâ€™s continue. Press Run !

134
4
2
12
2
1
1234
4
3
2
1
23
12
2
1
1234
4
3
2
1
1

Oh! This yellow section is exactly the same as the one we ignored last time.

This yellow section is exactly the same
as the last time
123567
7
6
4
12
2
1
1234
4
3
2
1
45
12
2
1
1234
4
3
2
1
3
2
1

Yes: This yellow section has appeared again.

Hmmâ€¦ interesting.

Letâ€™s ignore this section again:

Letâ€™s ignore the yellow section again
123456
6
5
Ignore
for Now
4
3
2
1

Iâ€™ve highlighted the differences from the last time in yellow below. Take a look.

Last time
1234
4
Ignore
for Now
3
2
1
This time
123456
6
5
Ignore
for Now
4
3
2
1

Pay attention to these two differences in particular:

• was before, but itâ€™s now .
• Thereâ€™s now a icon on the bottom.

I see, the number in went from to .

So it decreased by one.

The number in decreased by one

Maybe: If we continue, maybe the number in will become next?

Letâ€™s see if that turns out to be true.

Slide 6 / 13

### The third time

Letâ€™s continue. Weâ€™ll un-ignore the section we ignored earlier.

Un-ignore the section we ignored earlier
123456
6
5
Ignore
for Now
4
3
2
1
123567
7
6
4
12
2
1
1234
4
3
2
1
45
12
2
1
1234
4
3
2
1
3
2
1

Press Run !

123567
7
6
4
12
2
1
1234
4
3
2
1
45
12
2
1
1234
4
3
2
1
3
2
1

Again: The middle section is exactly the same as before. So weâ€™ll ignore this again:

This yellow section is exactly the same
as the last timeâ€¦
12346789
9
8
7
5
12
2
1
1234
4
3
2
1
56
12
2
1
1234
4
3
2
1
4
3
2
1
So letâ€™s ignore it for now
12345678
8