1. implement multi-dimension iterator for apl