Advertisement
mephage

ocaml-match.ml

Feb 6th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.26 KB | None | 0 0
  1. let pick_color x = match x with
  2.   | ((x mod 5), 0) -> green
  3.   | ((x mod 4), 0) -> purple
  4.   | (x mod 3, 0) -> blue
  5.   | (x mod 2, 0) -> yellow
  6.   | (x mod 1, 0) -> red
  7.   ;;
  8.  
  9. # All lines beginning with '|' are marked with "Syntax error inside `let'" by merlin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement