Hubbry Logo
search button
Sign in
Opal (programming language)
Opal (programming language)
Comunity Hub
History
arrow-down
starMore
arrow-down
bob

Bob

Have a question related to this hub?

bob

Alice

Got something to say related to this hub?
Share it here.

#general is a chat channel to discuss anything related to the hub.
Hubbry Logo
search button
Sign in
Opal (programming language)
Community hub for the Wikipedia article
logoWikipedian hub
Welcome to the community hub built on top of the Opal (programming language) Wikipedia article. Here, you can discuss, collect, and organize anything related to Opal (programming language). The purpose of...
Add your contribution
Opal (programming language)

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]