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

Pull request for #28.

I've now updated the in-file documentation but feel free to rewrite it further.