Created
July 17, 2011 04:27
-
-
Save smly/1087180 to your computer and use it in GitHub Desktop.
want to pass the false-expression to define a ternary operation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ 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