aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/plot.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/plot.spad.pamphlet')
-rw-r--r--src/algebra/plot.spad.pamphlet6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/algebra/plot.spad.pamphlet b/src/algebra/plot.spad.pamphlet
index d03da277..664e3036 100644
--- a/src/algebra/plot.spad.pamphlet
+++ b/src/algebra/plot.spad.pamphlet
@@ -476,9 +476,9 @@ Plot(): Exports == Implementation where
myTrap: (F-> F, F) -> F
myTrap(ff:F-> F, f:F):F ==
- s := trapNumericErrors(ff(f))$Lisp :: Union(F, "failed")
- s case "failed" => quietDoubleNaN()$Lisp
- r:F:=s::F
+ s: Maybe F := trapNumericErrors(ff(f))$Lisp
+ s case nothing => quietDoubleNaN()$Lisp
+ r:F := s@F
r > max()$F or r < min()$F => quietDoubleNaN()$Lisp
r