repositories
/
cc1516.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added some type checking stuff. vardecl now works for basictypes and unary operators
[cc1516.git]
/
examples
/
example.spl
diff --git
a/examples/example.spl
b/examples/example.spl
index
0bf275e
..
e71c216
100644
(file)
--- a/
examples/example.spl
+++ b/
examples/example.spl
@@
-2,6
+2,14
@@
Three ways to implement the f acto rial function in SPL.
First the recursive version .
*/
Three ways to implement the f acto rial function in SPL.
First the recursive version .
*/
+Int r = 1;
+Char r = 1;
+Int r = -1;
+Void r = 0;
+Bool r = !True;
+Bool r = -True;
+//var facN = 1;
+//var ok = True;
facR(n) :: Int -> Int {
if (n < 2) {
facR(n) :: Int -> Int {
if (n < 2) {