Refactor to use deferred function composition

... instead of sequences of builder fns. core.typed can't typecheck the
sequences of heterogenous-but-composable functions.