Skip to content

Instantly share code, notes, and snippets.

@cohalz
Last active January 3, 2016 18:19
Show Gist options
  • Select an option

  • Save cohalz/8501177 to your computer and use it in GitHub Desktop.

Select an option

Save cohalz/8501177 to your computer and use it in GitHub Desktop.
let yen_of_doll doll =
let rate = 114.32 in
let yen = doll *. rate in
if (int_of_float(yen *. 10.0) mod 10) < 5 then int_of_float (yen) else int_of_float (yen+.1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment