batSubstring : fix fold_left, add fold_lefti, fold_righti