Interactive programming (repl): Difference between revisions

added standard ml
No edit summary
(added standard ml)
Line 94:
# f "Rosetta" "Code" ":";;
- : string = "Rosetta::Code"
#
 
=={{header|Python}}==
Line 120 ⟶ 121:
=> "Rosetta::Code"
irb(main):005:0> </lang>
 
=={{header|Standard ML}}==
{{works with|SML/NJ}}
Because you can enter expressions that span multiple lines, you have to type the semicolon (";") at the end so that it knows you are done.
 
$ sml
Standard ML of New Jersey v110.67 [built: Fri Jul 4 09:00:58 2008]
- fun f (s1, s2, sep) = String.concatWith sep [s1, "", s2];
[autoloading]
[library $SMLNJ-BASIS/basis.cm is stable]
[autoloading done]
val f = fn : string * string * string -> string
- f ("Rosetta", "Code", ":");
val it = "Rosetta::Code" : string
-
 
{{Omit From|Java}}{{Omit From|C}}{{Omit From|C++}}
Anonymous user