Opal (programming language)

From Wikipedia, the free encyclopedia
Revision as of 13:45, 23 September 2024 by imported>Vasywriter (Added GitHub URL)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Script error: No such module "about".

Template:Use dmy dates OPAL (OPtimized Applicative Language)[1] is a functional programming language first developed at Technische Universität Berlin.


There is a later framework for static code analysis also called Opal.[2]

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

References

Template:Reflist

External links


  1. REDIRECT Template:Prog-lang-stub

Template:R shell

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".