Note:

You are viewing a development version of the library. Goto the latest version.

let fold_left f acc str =
  let racc = ref acc in
    for i = 0 to String.length str - 1 do
      racc := f !racc str.[i]
    done;
    !racc