summaryrefslogtreecommitdiffhomepage
path: root/standard-ml.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'standard-ml.html.markdown')
-rw-r--r--standard-ml.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/standard-ml.html.markdown b/standard-ml.html.markdown
index c9eb2a2e..9ebf345b 100644
--- a/standard-ml.html.markdown
+++ b/standard-ml.html.markdown
@@ -385,7 +385,7 @@ fun calculate_interest(n) = if n < 0.0
(* Exceptions can be caught using "handle" *)
val balance = calculate_interest ~180.0
- handle Domain => ~180.0 (* x now has the value ~180.0 *)
+ handle Domain => ~180.0 (* balance now has the value ~180.0 *)
(* Some exceptions carry extra information with them *)
(* Here are some examples of built-in exceptions *)
@@ -395,7 +395,7 @@ fun failing_function [] = raise Empty (* used for empty lists *)
| failing_function xs = raise Fail "This list is too long!"
(* We can pattern match in 'handle' to make sure
- a specfic exception was raised, or grab the message *)
+ a specific exception was raised, or grab the message *)
val err_msg = failing_function [1,2] handle Fail _ => "Fail was raised"
| Domain => "Domain was raised"
| Empty => "Empty was raised"