Jump to content
Wikipedia The Free Encyclopedia

Opal (programming language)

From Wikipedia, the free encyclopedia
(Redirected from Opal programming language)
This article is about the functional programming language. For the Ruby interpreter, see Ruby (programming language) § Alternative implementations.

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

[edit ]

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

[edit ]
  1. ^ "Opal". TU-Berlin/opal - Optimized Applicative Language. Retrieved 2023年09月23日.
  2. ^ "Home page". OPAL Project. Retrieved 2023年11月25日.
[edit ]


Stub icon

This programming-language-related article is a stub. You can help Wikipedia by expanding it.

AltStyle によって変換されたページ (->オリジナル) /