File: sum.ml

package info (click to toggle)
camlp5 8.04.00-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,968 kB
  • sloc: ml: 137,918; makefile: 2,055; perl: 1,729; sh: 1,653; python: 38
file content (8 lines) | stat: -rw-r--r-- 163 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
EXTEND
  Pcaml.expr:
  [ [ "sum";
      e =
      FOLD0 (fun e1 e2 -> <:expr< $e2$ + $e1$ >>) <:expr< 0 >>
        Pcaml.expr SEP ";";
      "end" -> e ] ] ;
END;