port "if"; fix chaining; buf.write(func); more get()
#each ported (untested)