FPr (programming language)
Encyclopedia
FPr is a programming language that is an implementation of an FP-System. FP was invented by John Backus
John Backus
John Warner Backus was an American computer scientist. He directed the team that invented the first widely used high-level programming language and was the inventor of the Backus-Naur form , the almost universally used notation to define formal language syntax.He also did research in...

 and described in his Turing Award lecture. FPr features the list-techniques of Lisp and some technics of object-oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 especially the use of the infix notation
Infix notation
Infix notation is the common arithmetic and logical formula notation, in which operators are written infix-style between the operands they act on . It is not as simple to parse by computers as prefix notation or postfix notation Infix notation is the common arithmetic and logical formula notation,...

.
FPr offers an alternative for the usage of local variables
Local variable
In computer science, a local variable is a variable that is given local scope. Such a variable is accessible only from the function or block in which it is declared. In programming languages with only two levels of visibility, local variables are contrasted with global variables...

.

Example

len

lenrec ° id , (0 &) , nil
lenrec

(nilp ° 1) -> 2 ; lenrec ° (tail ° 1) , (2 + 1 &) , nil
Defines the function len for counting the elements of a list-object and the recursive function lenrec which is doing the loop.
len : (list :: aa bb cc dd ee)
Applicates the function len to a list-object with 5 elements.

See also

  • FP (programming language)
    FP programming language
    FP is a programming language created by John Backus to support the function-level programming paradigm...

  • Function-level programming
    Function-level programming
    In computer science, function-level programming refers to one of the two contrasting programming paradigms identified by John Backus in his work on programs as mathematical objects, the other being value-level programming....


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK