[#78] Implement partitions via intermediate function