main(x) = (s,t) where (s,t) = toc(x)

toc(Doc(x)) = (s,Doc(t)) where (s,t) = f(x)
f(Cons( St(t,b), x )) = (Cons(t,y), Cons(St(t,b),z)) 
	where (y,z) = f(x)
f(Cons(  S(b), x   )) = (y,z) where (y,z) = f(x)
f(Nil)                = (Nil, Nil )
