Source

ocaml-bert / bert.ml

Diff from to

File bert.ml

 exception Not_supported;;
 exception Unknown_type;;
 
+let print_binary bin = 
+  let rec print_ n =
+    if n < String.length bin then begin 
+      print_int (int_of_char (String.get bin n));
+      print_ (n+1);
+    end else 
+      print_endline " ahoge  .. "
+  in
+    print_ 0;;
+
 let make_small_bigint bin len =
   let rec make_small_bigint_ i prod v = 
     if i < len then