export fn merge_list<T>(a: List<T>, b: List<T>) -> List<T> {
    if a is (T, List<T>) {
        return [a.first, ...merge_list(a.rest, b)];
    }
    b
}

export fn deep_equal(a: Any, b: Any) -> Bool {
    if a is Bytes {
        if b is Bytes {
            a == b
        } else {
            false
        }
    } else {
        if b is Bytes {
            false
        } else {
            deep_equal(a.first, b.first) && deep_equal(a.rest, b.rest)
        }
    }
}
