entrytree_replace_f (e:et) (Loc (0:loc)) f =
    (e{entrytree_children = ch}:et, x)
    where
        (ch, x) = entrytree_replace_f (entrytree_children e) (Loc loc) f
entrytree_replace_f (e:et) (Loc (0:loc)) f =
    (e{entrytree_children = ch}:et, x)
    where
        (ch, x) = entrytree_replace_f (entrytree_children e) (Loc loc) f
entrytree_replace_f (e:et) (Loc (0:loc)) f =
    (e{entrytree_children = ch}:et, x)
    where
        (ch, x) = entrytree_replace_f (entrytree_children e) (Loc loc) f