Other forms: functions, functioning, functioned
A function is the job a thing is built to do. The function of a fridge is to keep food cold; the function of that small hole near the top of the sink is to stop the water going over the edge.
In programming, a function is a named block of code you call by name — you hand it something and it hands something back. In maths, a function turns each input into exactly one output. As a verb it means to work as intended: the lift is functioning again, the office functions without him. A function is also a formal event, the kind with a seating plan: a wedding reception, a company dinner. And "function as" means to serve as — the upturned crate functioned as a table all summer.
1nounpurposeThe job or purpose that a thing or a person exists to do.
“The main function of the kidneys is to filter waste out of the blood.”
2nounfunctionIn programming, a named piece of code that does one job and can be called from anywhere in a program.
“He wrote a short function that turns a date into a readable line of text.”
3nounmathematicsIn mathematics, a rule that gives exactly one output for every input.
“Plot the function and you get a smooth curve.”
4nounofficialA formal or official social event.
“He hates work functions and stands by the door all evening.”
5verbproperlyTo work, or to work properly.
“The heating has not functioned since November.”
Too few real examples of this word to estimate which sense is commonest.
Latin functiō meant a performance, an execution — a duty carried out — from the verb fungor, "to perform, execute, discharge". It reached English through Old French fonction and Middle French function. The root is reconstructed as Proto-Indo-European *bʰewg-, "to enjoy", so a job discharged and a pleasure taken share one distant ancestor.
Proto-Indo-European
*bʰewg-
Middle French
function
English, today
function
Built from
Borrowed from Middle French function. From Middle French function, from Old French fonction, from Latin functiō (“performance, execution”), from functus, perfect participle of fungor (“to perform, execute, discharge”), from Proto-Indo-European bʰewg- (“to enjoy”).
Etymology from Wiktionary, CC BY-SA