use earlier inferred functions for later inference, rewrite map example to not use tostring (in a more restricted form, it now infers it correctly)