refactor write to take a stream in preparation for exposing write in Scheme
refactor write to take a stream in preparation for exposing write in Scheme

carld/bootstrap-scheme,paoloo/bootstrap-scheme,petermichaux/bootstrap-scheme