Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
15
Task/Factorial/Maude/factorial.maude
Normal file
15
Task/Factorial/Maude/factorial.maude
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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 ! .
|
||||
Loading…
Add table
Add a link
Reference in a new issue