Recursive function refactoring help: occurrences of char in string starting at ith char
A simple recursive function would be:

let rec occFromIth s i ch = 
  if i &gt;= String.length s then 0
  else (if s.[i] = ch then 1 else 0) + occFromIth s (i + 1) ch