Reimplement ~> and ~>> without recursive invocations (resolves #28)