Keep the useful bits, human.
Beginner field notes
- A definition records what a function should do. Calling it asks that behavior to run; just writing the name is not the same action.
- Arguments are values supplied to a call. For the lesson’s make-label rule, Seeds and 3 are the inputs to one invocation.
- Use the stated rule to work out the result: make-label with Seeds and 3 returns Seeds: 3. A different function’s name alone does not tell you its rule.
See a worked example
Follow a definition and three separate calls
Sample only. Nothing here runs on your computer.
Offline Lantern Archive definition:
Name: make-label.
Inputs: kind must be nonempty text; quantity must be a positive whole number.
Normal result: text made from kind, a colon and space, and quantity.
First check kind; if it is empty or not text, report Invalid kind and return no normal label. Otherwise check quantity; if it is not valid, report Invalid quantity and return no normal label.
This rule performs no storage read or write.
A. The definition is recorded; no call is made.
B. Invoke make-label with kind Seeds and quantity 3.
C. Invoke the same make-label with kind Tools and quantity 2.
D. Invoke the same make-label with kind Seeds and quantity -1.
Assume these are the complete rules and each stated call finishes; no other work occurs.A. The definition exists. Invocation count: 0; no label has been produced.
B. Arguments: Seeds and 3. Normal result: Seeds: 3.
C. Arguments: Tools and 2. Normal result: Tools: 2.
D. The negative quantity violates the rule. Outcome: Invalid quantity; no normal label result.
The definition did not change across B, C and D. No saved Archive label was changed.First identify whether a call occurred. If it did, apply the definition to that call’s arguments and distinguish the normal result from the specified error outcome. The A/B/C/D notation is an inert trace, not executed code or a declaration that these words work as commands.
Visual
The reviewed description and complete diagram source are available here.
More of this diagram is available inside its frame. Focus the frame and use the arrow keys to pan.
Read the complete diagram source
This is the source for the reviewed diagram, not a command to run.
flowchart LR
D["Definition: make-label rule"] -. "Used when called" .-> C["Explicit invocation with kind and quantity arguments"]
C --> V{"Inputs meet this rule?"}
V -->|"Yes"| R["Return formatted label"]
V -->|"No"| E["Report invalid input; no normal label result"] Sources and full explanation
Notes sources · Beginner
AI source review · 2026-10-17
Reviewed explanation
A function is a unit of behavior that another part of a program can call. A definition describes its rule; a call, or invocation, asks it to run. In our fictional Lantern Archive, the named function make-label knows how to format an item name and quantity. Merely writing its name or describing its rule is not the same as invoking it.
An argument is a value supplied to a particular call. Our rule accepts two arguments: kind, such as Seeds, and quantity, such as 3. The words kind and quantity label the inputs expected by this rule. You can follow those labels without learning variables, a programming language or terminal commands. Real languages have their own ways to define functions and pass arguments; the paper trace below is not any language’s source-code syntax.
The definition says exactly what counts as valid input and what normal result to return. For a nonempty kind and a positive whole-number quantity, make-label returns text in the form kind: quantity. Calling it with Seeds and 3 therefore returns Seeds: 3. That answer follows from the stated rule and supplied arguments, not from a special meaning built into the name make-label.
A call can also fail to produce its normal result. Our definition rejects a negative quantity with the explicit error Invalid quantity, rather than returning a valid label. Other functions may return no useful value, report errors differently, or perform work such as reading or changing stored information. This example deliberately only formats text; it does not establish that every function is pure, always succeeds or has a return value.
Keep the reusable definition separate from each invocation. The definition remains the same when two calls use different inputs. A function can run inside an ordinary application; it does not become an AWS service just because it is called a function. AWS Lambda adds a particular way to host and invoke code, which is a separate topic. Here we are learning definition, invocation, argument and result, not writing or deploying code.
- MDN Glossary: Function
Supports a callable unit, arguments supplied as input, a definition/name and an optional return value. The source includes JavaScript-specific material; this lesson uses only the narrow conceptual distinction and claims no cross-language syntax, purity or execution model.
AI source comparison recorded 2026-10-17. Human learner validation is pending.
Quick quiz · one question
Separate a definition from its calls
Sample scenario. Synthetic offline Lantern Archive fixture. Same fixed language-neutral make-label rule; kind checked first. Each stated call finishes; no storage effects.
- Recorded fixed definition
make-label: kind must be nonempty text; spaces are preserved. Then quantity must be a positive whole number. Return kind + colon-space + quantity, otherwise Invalid kind/Invalid quantity. No storage effect. A definition alone is zero calls.- Call b
kind="Seeds", quantity=3. These are data, not executable source.- Call c
kind="Tools", quantity=2. These are data, not executable source.- Call d
kind="Seeds", quantity=-1. These are data, not executable source.
The make-label definition is recorded. Follow the three listed calls. What normal results or errors follow, and did recording the definition already invoke it?
Why this answer?
Answers stay on this device.
Sources and exercise scope
- MDN Glossary: Function
Supports a callable unit, arguments supplied as input, a definition/name and an optional return value. The source includes JavaScript-specific material; this lesson uses only the narrow conceptual distinction and claims no cross-language syntax, purity or execution model.
Original synthetic exercise. AI comparison against the reviewed lesson recorded on 2026-10-17; the references above state their scope. Human learner validation has not been run. A result here records this attempt; it does not establish mastery.
Save or adjust this lesson
Make this lesson yours
Save it for later, or tell your robot what would help.
This correction stays on this browser. Browse all concepts if the topic is missing.
Familiarity is your own assessment. To use it in your coding tool, download your updated learning profile.
Choices are saved on this browser. They do not sync to your account or coding tool.