File: index.html

package info (click to toggle)
js-of-ocaml 6.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (28 lines) | stat: -rw-r--r-- 837 bytes parent folder | download | duplicates (4)
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>