Compartmentalization of single polymer chains by stepwise intramolecular cross-linking of sequence-controlled macromolecules.