Modified partition so it works with all sequences.
Added tests for vectors.