From c4664b31e5231fb56cb36cbebcef50ee699fda07 Mon Sep 17 00:00:00 2001 From: Chariton Charitonidis Date: Fri, 15 Mar 2019 11:01:23 +0200 Subject: Added a comment to better demonstrate custom datatypes. It is not obvious for a beginner (like me) to declare a new value of the temp datatype which can be either C (celsius) or F (fahrenheit). I think it would be better to demonstrate the declaration of such a datatype. --- standard-ml.html.markdown | 3 +++ 1 file changed, 3 insertions(+) (limited to 'standard-ml.html.markdown') diff --git a/standard-ml.html.markdown b/standard-ml.html.markdown index b34f1c08..0ba42f39 100644 --- a/standard-ml.html.markdown +++ b/standard-ml.html.markdown @@ -272,6 +272,9 @@ fun evenly_positioned_elems (odd::even::xs) = even::evenly_positioned_elems xs datatype temp = C of real | F of real + +(* Declaring a new C temp value... + val t: temp = C 45.0 *) fun temp_to_f t = case t of -- cgit v1.2.3