repositories
/
cc1516.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
working lexer and printer
[cc1516.git]
/
example.spl
1
/*
2
Three ways to implement the f acto rial function in SPL.
3
First the recursive version .
4
*/
5
facR(n) :: Int -> Int {
6
if (n < 2) {
7
return 1;
8
} else {
9
return n * facR(n-1);
10
}
11
}