Skip to content

Instantly share code, notes, and snippets.

@jlouis
Created September 11, 2008 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlouis/10331 to your computer and use it in GitHub Desktop.
Save jlouis/10331 to your computer and use it in GitHub Desktop.
val a = [1.0, 2.0]
val b = [1.0, 2.0]
val _ = if a = b then print "True\n"
else print "False\n"
---
jlouis@succubus:~$ mosml z.sml
Moscow ML version 2.01 (January 2004)
Enter `quit();' to quit.
[opening file "z.sml"]
True
> val a = [1.0, 2.0] : real list
val b = [1.0, 2.0] : real list
[closing file "z.sml"]
---
jlouis@succubus:~$ mlton z.sml
Error: z.sml 4.14.
Function applied to incorrect argument.
expects: [<equality>] * [<equality>]
but got: [<non-equality>] * [<non-equality>]
in: = (a, b)
compilation aborted: parseAndElaborate reported errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment