Stdlib compat

This is missing tests and documentation but I'd like to get some comments on it.