SMoL

Introduction

This thread consists of a few exercises meant to acquaint you with the Standard Model of Languages. It begins with a simple version of the model and becomes richer.

Each assignment will consist of a quiz in which you will be shown a few programs in that version of the model. Some programs will be very simple while others will be harder, but the order is randomized so you shouldn’t assume early ones are easy and later ones are hard.

Your task is to predict what each program will produce.

There’s an easy way to do this: paste the program into Racket and run it. Obviously, if we wanted you to do this, we wouldn’t have bothered assigning them: we can do that ourselves. Rather, we want you to think about the programs and answer with what you believe they will produce.

After you have submitted your answer, run the program and see whether it matches your expectation. If it does not, think about why you went wrong. If you are still not sure, ask us!

These examples are carefully designed to enhance your learning, so if you “cheat” by running the programs first, you’ll be depriving yourself of part of your education.

Time

Spend a maximum of an hour.

Grading Standard

If we graded you on the correctness of your predictions, you would be inclined to first run the program, thereby undermining the whole purpose of the assignment.Your wrong answers are in many ways even more informative than the right ones, because they help us understand what you might be misunderstanding.

Instead, therefore, we will only check whether you appeared to put in a good-faith effort in doing the work. If we find your work is below our expected standards, we will reach out to you to understand why; only if you have an unsatisfactory response will you be penalized.

In the limiting case, you can get every single answer wrong, but so long as you appear to have done so conscientiously, you will meet the expectation of this thread.

Software

Install the SMoL family of languages, following the instructions there. Please look out for announcements on the forum to update. Update instructions are also on the repository’s page.

Tasks

    1 smol/fun

    2 smol/state

    3 smol/hof