add append function to tiny_rope.sml

This commit is contained in:
2024-03-13 06:54:19 +00:00
parent 7bd4fad8e8
commit 21fd98df8b
3 changed files with 51 additions and 7 deletions

View File

@@ -21,17 +21,17 @@ fun run_txns arr =
let
val rope =
if del_num > 0
then Rope.delete(pos, del_num, rope)
then TinyRope.delete(pos, del_num, rope)
else rope
val str_size = String.size ins_str
val rope =
if str_size > 0
then Rope.insert(pos, ins_str, rope)
then TinyRope.insert(pos, ins_str, rope)
else rope
in
rope
end)
Rope.empty arr
TinyRope.empty arr
fun run_txns_time title arr =
let
@@ -41,7 +41,7 @@ fun run_txns_time title arr =
end
fun run_to_string rope =
Rope.toString rope
TinyRope.toString rope
fun run_to_string_time title rope =
let