source: doc/theses/rob_schluntz/examples/variadic/sum1.c@ 7416d46a

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since 7416d46a was 728df66, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

more documentation name changes

  • Property mode set to 100644
File size: 208 bytes
Line 
1int sum(void){ return 0; } // (0)
2forall(ttype Params | { int sum(Params); })
3int sum(int x, Params rest) { // (1)
4 return x+sum(rest);
5}
6int main() {
7 printf("%d\n", sum(10, 20, 30, 40, 50, 60));
8}
Note: See TracBrowser for help on using the repository browser.