From 106a5eb79b9fb4d81aaec34e382c90a481316524 Mon Sep 17 00:00:00 2001 From: "M. Fareed Arif" Date: Tue, 22 Sep 2020 16:41:38 -0500 Subject: [PATCH] Fixed two errors by adding str_to_bytes and bytes_to_string in the converstion related to unroll of X --- main.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.ml b/main.ml index 00a6dc0..184d66c 100644 --- a/main.ml +++ b/main.ml @@ -12,11 +12,11 @@ let onestep_xto01 : string -> string list then [str] else let idx = String.index str 'X' in - let str1 = str in - let str2 = Bytes.copy str in + let str1 = Bytes.of_string str in + let str2 = Bytes.copy (Bytes.of_string str) in let _ = Bytes.set str1 idx '0' in let _ = Bytes.set str2 idx '1' in - [str1]@[str2] + [Bytes.to_string str1]@[Bytes.to_string str2] (* onestep for all strings *) let onestep_strlst : string list -> string list