Created
May 20, 2011 05:18
-
-
Save t0yv0/982404 to your computer and use it in GitHub Desktop.
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
| type R = | |
| { | |
| A : int | |
| B : int | |
| C : int | |
| } | |
| let Test = | |
| { | |
| A = (printf "A"; 1) | |
| C = (printf "B"; 2) | |
| B = 3 | |
| } |
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
| type r = | |
| { | |
| a : int; | |
| b : int; | |
| c : int; | |
| } | |
| let test = | |
| { | |
| a = (Printf.printf "A"; 1); | |
| c = 3; | |
| b = (Printf.printf "B"; 2); | |
| } |
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
| structure Test = | |
| struct | |
| type r = | |
| { | |
| a : int, | |
| b : int, | |
| c : int | |
| } | |
| val test = | |
| { | |
| a = (print "A"; 1), | |
| c = 3, | |
| b = (print "B"; 2) | |
| } | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Surprisingly, OCAML 3.11.2 and F# print "BA" for this code while SML/NJ 110.72 prints "AB" as expected.