Unfortunately some of the functions in stdlib need a serious overhaul, because they used a fair amount of [cargo cult programming](http://en.wikipedia.org/wiki/Cargo_cult_programming). It's unfortunate that we have that legacy code but I would like to have it removed in the future.