0
文字列に応じて文字列を文字列に分解する関数を作りたいのですが、わからない理由でOCaml解釈プログラムが私の第3行に文字エラー6-7これは実際に私のフィルタの集計です。私はかなり混乱しています。私は何を間違えたのですか?OCamlで爆発
let explode s c =
let rec explodeIn s c p l = function
| p + 1 -> (String.sub s 0 p)::l
| _ -> let idx = String.rindex_from s p c in; explodeIn s c (idx - 1) ((String.sub s (idx + 1) (p - idx))::l) (String.index s c)
in
explodeIn s c (String.lentgh - 1) [] (String.index s c)
;;
ですか作品ありがとうございました!また、私はそれらの誤植に気付き、修正しました –