def path.reverse
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDbimport Base
680# Keeps the original table when SST publication fails; after publication,
681# checkpoints the WAL through atomic replacement and retains canonical entries.
682# Reverses a string while preserving all path characters.
683def path.reverse(path: String, reversed: String) -> String:
684 match path:
685 case SNil{}: reversed
686 case SCon{character, rest}:
687 path.reverse(rest, SCon{character, reversed})