added possibility of mapping functions

(in the meantime removed necessity of `new` for stretch.Document)