diff options
author | Robert Sloan <varomodt@gmail.com> | 2016-06-01 21:36:12 -0400 |
---|---|---|
committer | Robert Sloan <varomodt@gmail.com> | 2016-06-22 13:43:37 -0400 |
commit | d3c45ab10d26905572c90ee621344b4357a54d7a (patch) | |
tree | b776854d4f5498ade029bf7b3de920abf67708e2 /src/Assembly/Output.ml | |
parent | 94503cf2857d80b0944404026e1b0ccb83e16fe8 (diff) |
Parsing portion of StringConversion
Running PipelineExample
Running PipelineExample
Running PipelineExample
Diffstat (limited to 'src/Assembly/Output.ml')
-rw-r--r-- | src/Assembly/Output.ml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Assembly/Output.ml b/src/Assembly/Output.ml new file mode 100644 index 000000000..d84aee0a2 --- /dev/null +++ b/src/Assembly/Output.ml @@ -0,0 +1,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) ;; |