generic resizable stack