Advertisement
Guest User

Untitled

a guest
Sep 7th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.34 KB | None | 0 0
  1. let rec hello_worlds n = function
  2.     | 0 -> ()
  3.     | n -> print_endline "Hello World";
  4.         pred n
  5.         |> hello_worlds
  6. let main =
  7.     input_line stdin
  8.     |> int_of_string
  9.     |> hello_worlds
  10.  
  11. File "solution.ml", line 5, characters 8-38:
  12. Error: This expression has type int -> unit
  13.        but an expression was expected of type unit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement