example.procker 252 B

123456789101112131415161718192021
  1. import scheme.base;
  2. import scheme.read;
  3. import scheme.write;
  4. import scheme.load;
  5. load("./procker.scm");
  6. function factorial(n) {
  7. var i;
  8. var p = 1;
  9. for (i = 1; i <= n; i += 1) {
  10. p *= i;
  11. }
  12. return p;
  13. }
  14. display(factorial(10));
  15. newline();