Initial
ci / test (push) Waiting to run

This commit is contained in:
2026-04-24 22:11:05 +00:00
commit 93add075cb
24 changed files with 1321 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
type tree =
| Leaf of int
| Node of tree * tree
let int_value = 13
let float_value = 42.0
let list_value = [ 1; 2; 3 ]
let array_value = [| "a"; "b"; "c" |]
let float_array = [| 1.0; 2.0; 3.0 |]
let shared = Leaf 7
let tree = Node (shared, shared)
let rec cycle = 1 :: 2 :: 3 :: cycle
let () =
Graphis.context (fun ctx ->
Graphis.print_dot Format.std_formatter
[
"cycle", Graphis.capture ctx cycle;
"tree", Graphis.capture ctx tree;
"float_array", Graphis.capture ctx float_array;
"array", Graphis.capture ctx array_value;
"list", Graphis.capture ctx list_value;
"float", Graphis.capture ctx float_value;
"int", Graphis.capture ctx int_value;
])
+5
View File
@@ -0,0 +1,5 @@
(executable
(name demo)
(flags
(:standard -w -30))
(libraries graphis))
+5
View File
@@ -0,0 +1,5 @@
(executable
(name example)
(flags
(:standard -w -30-69))
(libraries graphis))
+22
View File
@@ -0,0 +1,22 @@
type node = {
value : int;
mutable next : node option;
}
let node value = { value; next = None }
let () =
let tail = node 30 in
let left = node 10 in
let right = node 20 in
left.next <- Some tail;
right.next <- Some tail;
tail.next <- Some left;
Graphis.context (fun ctx ->
Graphis.print_dot Format.std_formatter
[
"left_head", Graphis.capture ctx left;
"right_head", Graphis.capture ctx right;
"shared_tail", Graphis.capture ctx tail;
])