daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type i_or_f = Int of int | Float of float;;
  2. let conv x = match x with Int i -> float_of_int i | Float f -> f;;
  3.    
  4. utop # conv (Int 4);;
  5.  - : float = 4.
  6.  utop # conv (Float 4.);;
  7.  - : float = 4.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top