Function
Function - a component which can be included in a synchronization rule or a workflow definition to process data values .
In computer science, the function is the fundamental concept of modularity. It denotes a piece of code (routine, procedure, etc.) that takes care of one action extracted away from the main code into a standalone block that can be plugged anywhere else. Functions possess a few traits [1]:
- name: usually in camel or snake case, that describes what it does. For example, binary_sort, invalid input, use effect;
- parameters: a series of values that the function takes and needs to run. For example, if a function is dedicated to counting the greatest common divisor of two numbers, then it needs to have those two names supplied;
- optionally, return type: statically-typed language mundane the function to always return a value of one type, be it integer, character, pointer, complex algebraic type, implicitly or explicitly. Dynamically-typed languages, on the other hand, allow function to return any value or not to return at all.
Functions have originated a programming paradigm known as functional programming. In functional languages, such as Haskell, functions are not allowed to have any side-effects and are used to solve the business problem by dividing it into smaller problems each corresponding its own function that gets called conditionally. It implements the principle of lambda calculus that states for every function with the same input values the output must be the same, essentially the same as in mathematical functions. In object-oriented programming, functions are commonly members of classes and are called methods, and consequently they can access all private data within class and be hidden as well. [2, 80-84] Finally, functional programming should be confused with procedural (such as the C programming language) as the latter uses functions as a way to substitute large piece of code under one meaningful name for purposes of extensibility and maintainability. In procedural programming functions are allowed to have side-effects and behave flexibly. OOP takes the similar approach.
Function - a prewritten formula that simplifies the process of entering calculations and enables the user to use formulas that might be difficult to build from scratch. Function - a data service operation that is bound to a URI that does not have a sideeffect on data exposed by the data service .
Sources:Dictionary of Computer and Internet Terms (Vol. 1) John C. Rigdon, 2016 – 1471 c. – 541
P. Hudak. (1989). Conception, Evolution and Application of Functional Programming Languages. ACM Computing Surveys, 3(21), 363-382.
M. J. Dominus (2005). Higher-Order Perl. Burlington, the USA: Morgan Kaufmann.