Pātuhitia tēnei: Algebraic structure theory of sequential machines