I've decided to do a simple exercise in OCaml, writing a guess the number application:

The solution I came up with was this:

```
let () = 
  let func_end = ref false in 
  while !func_end != true do
    let () = print_endline "Enter guess:" in
    let input = read_int () in
    let bound = 50 in 
    let random_number = Random.int bound in 
    if input == random_number then 
      let () = print_endline "Correct!" in
      func_end := true
  done

```

I wonder if there's a more functional approach to this problem,
the use of refs seems more imperative rather than functional.