Text this: Backtracking with cut via a distributive law and left-zero monoids