a self-contained block of code that performs a specific task
subroutine
method
procedure
The function was called every time a user logged in.
The developer wrote a function to validate user input.
The software's functions were optimized for performance.