>>ATS doesn't seem to allow a sequence expression in the "in" position of a let expression,
It does. You can write: implement main0 () = let val ha = print("ha") in ha; ha end To get two ha's, you can write: implement main0 () = let val ha = $delay(print("ha")) in !ha; !ha end If you want 1000 ha's, you can do: #include "share/atspre_staload.hats" #include "share/atspre_staload_libats_ML.hats" implement main0 () = let val ha = $delay(print("ha")) in 1000 * ha end On Wed, Mar 20, 2019 at 9:45 PM Brandon Barker <brandon.bar...@gmail.com> wrote: > I'm a little rusty, so can't come up with many good examples. > > Apparently it is possible to do something like this in OCaml: > > implement > main0 () = { > val () = let > val ha = print("ha") > in > (ha; ha) // How to get two ha's here? > end > } > > > After running the program, you would only see one "ha", which violates RT. > > However, ATS doesn't seem to allow a sequence expression in the "in" > position of a let expression, as this doesn't compile. Admittedly I'm just > trying to see if ATS2 doesn't have RT in this particular case, but it would > also be good to know about the sequence expressions here. > > -- > You received this message because you are subscribed to the Google Groups > "ats-lang-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ats-lang-users+unsubscr...@googlegroups.com. > To post to this group, send email to ats-lang-users@googlegroups.com. > Visit this group at https://groups.google.com/group/ats-lang-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ats-lang-users/5eba6b86-4146-4ba2-a87f-f8c511d902f0%40googlegroups.com > <https://groups.google.com/d/msgid/ats-lang-users/5eba6b86-4146-4ba2-a87f-f8c511d902f0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To post to this group, send email to ats-lang-users@googlegroups.com. Visit this group at https://groups.google.com/group/ats-lang-users. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpMhEQaC0p5kZU9FCv5P%3D7peso%3DmjtCC%3DkeJXs51FpvXg%40mail.gmail.com.