repositories
/
cc1516.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of https://github.com/dopefishh/cc1516
[cc1516.git]
/
examples
/
higher.spl
diff --git
a/examples/higher.spl
b/examples/higher.spl
index
75d5d9b
..
59bbbf5
100644
(file)
--- a/
examples/higher.spl
+++ b/
examples/higher.spl
@@
-38,7
+38,9
@@
giveF(){
return (\x->x+1);
}
-
+plus(x, y){
+ return x + y;
+}
main(){
var x = 5;
@@
-58,4
+60,6
@@
main(){
print("sum of 1..5 is: ", foldr(\x y->x+y, 0, intList(5)));
print("sum of 0..12 but only the evens: ",
foldr(\x y->x+y, 0, filter(\x->x%2 == 0, intList(12))));
+
+
}