A function, like in mathematics, is a process that accepts inputs, does processing and returns a singular output or ADT. Functions can be defined, reused, and even portable.
Functions that helps to simplify the algorithm’s definition are called helper functions.