mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 10:01:38 +00:00
Merge pull request #3494 from haritonch/patch-1
[SML/en] Added a comment to better demonstrate custom datatypes
This commit is contained in:
commit
45a3087c62
@ -273,6 +273,9 @@ 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
|
||||
C x => x * (9.0 / 5.0) + 32.0
|
||||
|
Loading…
Reference in New Issue
Block a user