insert :: Alphabet -> TransitionFunc
insert x (q, s)
	| label q == "START" = case s of
		Zero -> (Q "COPYZERO", x, R)
		One -> (Q "COPYONE", x, R)
		Blank -> (Q "END", x, S)
	| label q == "COPYONE" = case s of
		Zero -> (Q "COPYZERO", One, R)
		One -> (q, One, R)
		Blank -> (Q "GOBACK", One, L)
	| label q == "COPYZERO" = case s of
		Zero -> (q, Zero, R)
		One -> (Q "COPYONE", Zero, R)
		Blank -> (Q "GOBACK", Zero, L)
	| label q == "GOBACK" = case s of
		Blank -> (Q "END", Blank, R)
		s -> (q, s, L)
insert :: Alphabet -> TransitionFunc
insert x (q, s)
	| label q == "START" = case s of
		Zero -> (Q "COPYZERO", x, R)
		One -> (Q "COPYONE", x, R)
		Blank -> (Q "END", x, S)
	| label q == "COPYONE" = case s of
		Zero -> (Q "COPYZERO", One, R)
		One -> (q, One, R)
		Blank -> (Q "GOBACK", One, L)
	| label q == "COPYZERO" = case s of
		Zero -> (q, Zero, R)
		One -> (Q "COPYONE", Zero, R)
		Blank -> (Q "GOBACK", Zero, L)
	| label q == "GOBACK" = case s of
		Blank -> (Q "END", Blank, R)
		s -> (q, s, L)
insert x (q, s)
	| label q == "START" = case s of
		Zero -> (Q "COPYZERO", x, R)
		One -> (Q "COPYONE", x, R)
		Blank -> (Q "END", x, S)
	| label q == "COPYONE" = case s of
		Zero -> (Q "COPYZERO", One, R)
		One -> (q, One, R)
		Blank -> (Q "GOBACK", One, L)
	| label q == "COPYZERO" = case s of
		Zero -> (q, Zero, R)
		One -> (Q "COPYONE", Zero, R)
		Blank -> (Q "GOBACK", Zero, L)
	| label q == "GOBACK" = case s of
		Blank -> (Q "END", Blank, R)
		s -> (q, s, L)