OPAL (OPtimized Applicative Language) is a
functional programming language
In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that ...
first developed at the
Technical University of Berlin
The Technical University of Berlin (official name both in English and german: link=no, Technische Universität Berlin, also known as TU Berlin and Berlin Institute of Technology) is a public research university located in Berlin, Germany. It was ...
.
Example program
This is an example OPAL program, which calculates the
GCD recursively.
; Signature file (declaration)
SIGNATURE GCD
FUN GCD: nat ** nat -> nat
; Implementation file (definition)
IMPLEMENTATION GCD
IMPORT Nat COMPLETELY
DEF GCD(a,b) IF a % b = 0 THEN b
ELSE IF a-b < b THEN GCD(b,a-b)
ELSE GCD(a-b,b)
FI
FI
External links
The OPAL Home PageOPAL Installation Guide
Functional languages
{{compu-lang-stub