pickNextResidual :: [ResidualSpace] -- ^ The residual spaces to be tried
              -> EuclideanSpace3D -- ^ A package
              -> AxeOrder -- ^ The fillorder to be used
              -> Quantity -- ^ The maximum amount of packages to be placed
              -> Maybe (ResidualSpace, EuclideanSpace3D, [Vec3], Quantity) -- ^ The picked residual space, used package, all translation vectors and used quantity
                                                                        -- or 'Nothing' if not a single package could be placed in any residual space
pickNextResidual rs p ao q = L.foldl (\b a -> b `mplus` fillQuantityMaybe (p, a) ao q) Nothing rs
pickNextResidual :: [ResidualSpace] -- ^ The residual spaces to be tried
              -> EuclideanSpace3D -- ^ A package
              -> AxeOrder -- ^ The fillorder to be used
              -> Quantity -- ^ The maximum amount of packages to be placed
              -> Maybe (ResidualSpace, EuclideanSpace3D, [Vec3], Quantity)
pickNextResidual rs p ao q = L.foldl (\b a -> b `mplus` fillQuantityMaybe (p, a) ao q) Nothing rs
pickNextResidual rs p ao q = L.foldl (\b a -> b `mplus` fillQuantityMaybe (p, a) ao q) Nothing rs