Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added type casting to avoid type errors #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down