Remove trailing whitespace
Make partitions more robust

Implement partitions(n, m) in the cases where n = 1 and m > n,
as well as the analogous situation for partitions(v::Vector, m).
Remove unnecessary check
Merge pull request #7072 from wsliang/partition

Implement corner cases for partitions