Port  (just the helper func) to shin, for fun.
Port 'vector' (just the helper func) to shin, for fun.