Skip to content

Instantly share code, notes, and snippets.

@t0yv0
Created May 20, 2011 05:18
Show Gist options
  • Select an option

  • Save t0yv0/982404 to your computer and use it in GitHub Desktop.

Select an option

Save t0yv0/982404 to your computer and use it in GitHub Desktop.
type R =
{
A : int
B : int
C : int
}
let Test =
{
A = (printf "A"; 1)
C = (printf "B"; 2)
B = 3
}
type r =
{
a : int;
b : int;
c : int;
}
let test =
{
a = (Printf.printf "A"; 1);
c = 3;
b = (Printf.printf "B"; 2);
}
structure Test =
struct
type r =
{
a : int,
b : int,
c : int
}
val test =
{
a = (print "A"; 1),
c = 3,
b = (print "B"; 2)
}
end
@t0yv0

t0yv0 commented May 20, 2011

Copy link
Copy Markdown
Author

Surprisingly, OCAML 3.11.2 and F# print "BA" for this code while SML/NJ 110.72 prints "AB" as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment