sml Interactive Programming using the REPL Using 'it'

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

All SML expressions return a value. The REPL stores the return value of the last evaluated expression. it provides the value of the last evaluated expression within the REPL.

smluser> sml
Standard ML of New Jersey v110.78 [built: Thu Jul 23 11:21:58 2015]
- 3+4;
val it = 7 : int
- it;
val it = 7 : int
- it + 1;
val it = 8 : int
-

[1]+  Stopped                 sml
smluser>

Effectively, comments are not evaluated by the REPL and do not change the value of it.

smluser> sml
Standard ML of New Jersey v110.78 [built: Thu Jul 23 11:21:58 2015]
- 3+4;
val it = 7 : int
- (* a comment *);
- it;
val it = 7 : int

[1]+  Stopped                 sml
smluser>


Got any sml Question?