aboutsummaryrefslogtreecommitdiff
path: root/src/Assembly/Output.ml
blob: d84aee0a255d223da2c627f4d2212168215da990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

open Result

let list_to_string s =
  let rec loop s n =
    match s with
      [] -> String.make n '?'
    | car :: cdr ->
      let result = loop cdr (n + 1) in
        Bytes.set result n car;
        result
    in loop s 0 ;;

print_string (list_to_string result) ;;