let filter ?from ?length s ~f =       filter_map ?from ?length s ~f:(fun c -> if f c then Some c else None)