Skip to content

Instantly share code, notes, and snippets.

@smly
Created July 17, 2011 04:27
Show Gist options
  • Select an option

  • Save smly/1087180 to your computer and use it in GitHub Desktop.

Select an option

Save smly/1087180 to your computer and use it in GitHub Desktop.
want to pass the false-expression to define a ternary operation
$ sml
Standard ML of New Jersey v110.72 [built: Sun May 22 00:51:36 2011]
- fun op -: (x,y,z) = x + y * z;
val -: = fn : int * int * int -> int
- infix 6 -:;
- 3 -: 2;
stdIn:5.1-5.7 Error: operator and operand don't agree [tycon mismatch]
operator domain: int * int * int
operand: int * int
in expression:
3 -: 2
- op-: (1,2,3);
val it = 7 : int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment