What is a function — CCA-F Exam Prep
L0.22|What is a function
1/12
A toaster vs a chef. Both make toast.
The toaster does ONE thing: bread in, toast out. Every time. No variation. No creativity. No asking "would you prefer sourdough?" Bread in. Toast out.
The chef is a whole program. She makes toast, eggs, pancakes, omelets. She improvises. She adjusts. She runs an entire kitchen.
The toaster is a function. The chef is the program that calls the toaster.
