In programming, a function is a named section of a program that performs a specific task. They are great for cutting down on programming time, because whenever you need that task performed you can call the function. A function is a type of procedure or routine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value. Most programming languages come with a prewritten set of functions that are kept in a library, but you can also write your own functions to perform custom tasks. The term function can also be used synonymously sometimes with the words operation and command.