PPT Slide
Now if you ask it for another answer it backs up.
redo insert( 1, [ 2, 3 ], Q )
insert( 1, [ 2, 3 ], [ 2, 1, 3 ] )
permute( [ 1, 2, 3 ], [ 2, 1, 3 ] )
redo insert( 1, [ 2, 3 ], Q )
insert( 1, [ 2, 3 ], [ 2, 3, 1 ] )
permute( [ 1, 2, 3 ], [ 2, 3, 1 ] )
Now redoing the last insert fails.
redo permute( [ 2, 3 ], U1 )
permute( [ 2, 3 ], [ 3, 2 ] )
insert( 1, [ 3, 2 ], [ 1, 3, 2 ] )
permute( [ 1, 2, 3 ], [ 1, 3, 2 ] )