Maude is a programming language created in 1990.
#2430on PLDB | 34Years Old |
Maude is a high-level language and high-performance system supporting both equational and rewriting logic computation for a wide range of applications.
fmod FACTORIAL is
protecting INT .
op undefined : -> Int .
op _! : Int -> Int .
var n : Int .
eq 0 ! = 1 .
eq n ! = if n < 0 then undefined else n * (sd(n, 1) !) fi .
endfm
red 11 ! .