At 09:33 -0800 2/28/06, Jonathan Lang wrote:
>Technically, the result set is one element (the principle value),
>since a mathematical function - by definition - produces a single
>result for any given input.
Please be careful of "definitions" like that. Computer science has quite
different ideas about mathematics than those of chalkboard algebra.
x^(1/2) is a multivalued function and x^2 is a single valued function but they
are both pow(x ,y). The likes of yacc have other ideas causing -2^2 to become
+4 (thankfully not in perl) and sqrt(x) to become single valued positive
definite. -2^(1/2) is not the same as -sqrt(2) in some implementations.
Worse, the kB sometimes means 1024 bytes because computer science chose not to
use a century old definition but that's OT.
Perhaps "The perl definition of function is a subroutine that returns a single
result which is the same type as the arguments" or something more precise that
wouldn't rule out int( ) as a function. Perhaps "returns a single value
appropriate for the context at invocation".
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.