specialized scanLeft, scanRight