[REBOL] Re: More dialects than you think, validating function input.
From: lmecir:mbox:vol:cz at: 12-Sep-2002 18:35
Thanks.
-L
----- Original Message -----
From: "Brett Handley"
...
Here is the actual function I was working on:
bayes: function [
{Calculate combined probability.}
[catch] probabilities [any-block!]
] [p0 p1 d] [
p0: p1: 1.0
if not parse probabilities [
any [
set value number! (p0: value * p0 p1: 1 - value * p1) |
set value any-type! to end skip
]
] [throw make error! reduce ['script 'cannot-use 'bayes mold type?
get/any 'value]]
if zero? d: add p0 p1 [throw make error! "The probabilities cannot
be combined."]
divide p0 d
]
Sorry for the confusion.
Brett.