add delete function to rope.sml

This commit is contained in:
2024-02-15 14:05:50 +00:00
parent d5ffb4f762
commit ebf449205c
2 changed files with 158 additions and 79 deletions

View File

@@ -21,12 +21,12 @@ fun run_txns arr =
let
val rope =
if del_num > 0
then delete pos del_num rope
then Rope.delete(pos, del_num, rope)
else rope
val str_size = String.size ins_str
val rope =
if str_size > 0
then insert pos ins_str rope
then Rope.insert(pos, ins_str, rope)
else rope
in
rope