File: index.html

package info (click to toggle)
js-of-ocaml 5.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,020 kB
  • sloc: ml: 91,250; javascript: 57,289; ansic: 315; makefile: 271; lisp: 23; sh: 6; perl: 4
file content (28 lines) | stat: -rw-r--r-- 837 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
          "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  </head>
  <body>
    <script type="text/ocaml" stdout="script1" stderr="script1">
      let rec fact x =
      if x = 0
      then 1
      else x * fact (pred x)
      let _ = Format.printf "fact 10 = %d@." (fact 10)
      let _ = Format.eprintf "fact 20 = %d@." (fact 20)
    </script>
    <div id="script1"> </div>

    <script type="text/ocaml" stdout="script2" stderr="script2">
      print_endline "└── ";;
    </script>
    <div id="script2"> </div>

    <script type="text/javascript" src="eval.js"></script>

  </body>
</html>