tail-rec support for `or`
remove redundant code