LearnCore expressions

Core expressions

Learn the expression forms you use in most files.

Most Musi code is made from expressions. An expression gives back a value. A number gives back a number. A function call gives back the function result. A match gives back the branch result.

This part teaches the forms you will read every day: literals, tuples, operators, ranges, functions, lambdas, calls, and Dot-calls.

Think of expressions like small machines on a workbench. Each machine takes some parts and gives one part back. You can connect the machines because each one gives a value.

Read this part slowly. These forms appear in almost every later page.