Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: OCaml | Size: 0.53 KB | Hits: 55 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. # let print_one_entry (count, w_current) =
  2.   Printf.printf "at At iter: %d current weights are: " count;
  3.   List.iter (Printf.printf "%f ") w_current;   
  4.   Printf.printf "\n"
  5.  
  6. let print_it_delayed =
  7.   make_delayed_printer print_one_entry            ;;
  8. val print_one_entry : int * float list -> unit = <fun>
  9. val print_it_delayed : int * float list -> unit = <fun>
  10. # print_it_delayed(10, [1.; 2.; 3.]);;
  11. - : unit = ()
  12. # print_it_delayed(11, [2.; 5.]);;
  13. at At iter: 10 current weights are: 1.000000 2.000000 3.000000
  14. - : unit = ()