Change (combined-dimensions ...) to solve the general case.

Take the existing approach, written on a case by case basis for [1D 2D 3D] x [1D 2D 3D], and write the general algorithm for arbitrary sets of dimensions.
CRing myself: if-let => when-let
Merge pull request #5 from mrcslws/combined-dimensions

Change (combined-dimensions ...) to solve the general case.