Loading ...
Sorry, an error occurred while loading the content.

13957Re: "ocaml_beginners"::[] Problem with CAML

Expand Messages
  • Philippe Veber
    Sep 14, 2013
    • 0 Attachment

      you can have a look at chapter 16 of "le langage caml" [1], which gives a good overview on deterministic automata with caml. The book is in french, but the code snippets are, well in caml :o).

      hope this helps,

      [1] http://caml.inria.fr/distrib/books/llc.pdf

      2013/9/15 <jejebrazorf@...>

      Hi, I have a problem with the CAML language..I need to write a CAML prog ( not OCAML) that given three 3-letter words serch if the letters are present in the given words and in that case it will return true otherwise false. The program must use the deterministic automata.

      Do you have any idea? thanks

      Program without automa:

      let string_check c1 c2 string = (index_char string c1)>0 && (index_char string c2)>0;;

      let rec progCaml a b s_list = 
        match s_list with
          [] -> false
        | x::xs -> try
                      (string_check a b x)
                    Not_found -> progCaml a b xs;;

    • Show all 10 messages in this topic