Definition
A reusable block of code that takes input, does something specific, and returns output—basically the programming equivalent of a recipe that your code can follow without asking questions. It's the only thing standing between clean code and a nightmarish copy-paste hellscape.
Example Usage
I wrote a function to calculate discounts so I wouldn't have to paste that math everywhere.
Source: Programming terminology, Common in computer science
Related Terms
Translate This Term
See “function” in Corporate Speak, Gen-Z Slang, Pirate Speak, and more.
Try the Translator