ocaml-programming

Simple OCaml programs
git clone git://git.laack.co/ocaml-programming.git
Log | Files | Refs | README

list_length.ml (135B)


      1 let rec ll xs = match xs with
      2     | [] -> 0
      3     | x :: xs' -> 1 + ll xs'
      4 
      5 let () = 
      6     print_int (ll [10;131]);
      7     print_newline ();